Skip to content

Commit

Permalink
fix: fix crash when changing layout
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Apr 26, 2024
1 parent 5299eff commit 8b058da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/VisualizationPlugin/VisualizationPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const VisualizationPlugin = ({
onDrill,
}) => {
const engine = useDataEngine()
const [visualization, setVisualization] = useState(undefined)
const [visualization, setVisualization] = useState(null)
const [ouLevels, setOuLevels] = useState(undefined)
const [fetchResult, setFetchResult] = useState(null)
const [contextualMenuRef, setContextualMenuRef] = useState(undefined)
Expand Down Expand Up @@ -173,6 +173,7 @@ export const VisualizationPlugin = ({

useEffect(() => {
setFetchResult(null)
setVisualization(null)

// filter out disabled options
const disabledOptions = getDisabledOptions({
Expand Down

0 comments on commit 8b058da

Please sign in to comment.