- const query = this.route.snapshot.queryParams
- if (query['pluginType']) this.pluginType = parseInt(query['pluginType'], 10)
+ if (!this.route.snapshot.queryParams['pluginType']) {
+ const queryParams = { pluginType: PluginType.PLUGIN }
+
+ this.router.navigate([], { queryParams })
+ }
+
+ this.route.queryParams.subscribe(query => {
+ if (!query['pluginType']) return
+
+ this.pluginType = parseInt(query['pluginType'], 10)