Skip to content

Commit d776eb0

Browse files
authored
Merge pull request #1366 from qiwang97/fix-1365
fix(DonutChart): fix unobserve error #1365
2 parents 5d685bc + a953f06 commit d776eb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/createPlot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function createPlot<IPlotConfig extends Record<string, any>>(
291291
}
292292
}
293293
return () => {
294-
resizeObserver.current && resizeObserver.current.unobserve(container.current)
294+
resizeObserver.current && container.current && resizeObserver.current.unobserve(container.current)
295295
};
296296
}, [container.current, isAutoFit])
297297

0 commit comments

Comments
 (0)