Skip to content

Commit

Permalink
fix: avoid crash when visualization object is empty (ie. New)
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Oct 23, 2023
1 parent 30368b7 commit 9aea213
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Visualization/Visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,11 @@ export const visualizationSelector = createSelector(
(current, disabledOptions) => {
const visualization = cloneDeep(current)

Object.keys(disabledOptions).forEach(
(option) => delete visualization[option]
)
if (visualization) {
Object.keys(disabledOptions).forEach(
(option) => delete visualization[option]
)
}

return visualization
}
Expand Down

0 comments on commit 9aea213

Please sign in to comment.