Skip to content

Commit

Permalink
Merge pull request #1366 from qiwang97/fix-1365
Browse files Browse the repository at this point in the history
fix(DonutChart): fix unobserve error #1365
  • Loading branch information
Leannechn authored Feb 7, 2021
2 parents 5d685bc + a953f06 commit d776eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/createPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function createPlot<IPlotConfig extends Record<string, any>>(
}
}
return () => {
resizeObserver.current && resizeObserver.current.unobserve(container.current)
resizeObserver.current && container.current && resizeObserver.current.unobserve(container.current)
};
}, [container.current, isAutoFit])

Expand Down

0 comments on commit d776eb0

Please sign in to comment.