Skip to content

Commit

Permalink
Fix error when actionAnalyzerItems value is a string (#2159)
Browse files Browse the repository at this point in the history
Fixes #2158.

Only join `actionAnalyzerItems` values if the variable is an Array.

Signed-off-by: Thomas Wunschel <[email protected]>
  • Loading branch information
wuschi authored Nov 4, 2023
1 parent f1e2c39 commit f4bbba0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,13 @@ export const actionsMixin = {
break
case 'analyze':
case 'analyzer':
const actionAnalyzerItems = actionConfig[prefix + 'actionAnalyzerItems']
let actionAnalyzerItems = actionConfig[prefix + 'actionAnalyzerItems']
const actionAnalyzerChartType = actionConfig[prefix + 'actionAnalyzerChartType']
const actionAnalyzerCoordSystem = actionConfig[prefix + 'actionAnalyzerCoordSystem']
this.$f7.views.main.router.navigate(`/analyzer/?items=${actionAnalyzerItems.join(',')}&chartType=${actionAnalyzerChartType || ''}&coordSystem=${actionAnalyzerCoordSystem || ''}`)
if (Array.isArray(actionAnalyzerItems)) {
actionAnalyzerItems = actionAnalyzerItems.join(',')
}
this.$f7.views.main.router.navigate(`/analyzer/?items=${actionAnalyzerItems || ''}&chartType=${actionAnalyzerChartType || ''}&coordSystem=${actionAnalyzerCoordSystem || ''}`)
console.log('Opening the analyzer')
break
case 'url':
Expand Down

0 comments on commit f4bbba0

Please sign in to comment.