diff --git a/src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj b/src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj index 3570d624..2938cdfd 100644 --- a/src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj +++ b/src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj @@ -1,7 +1,7 @@ - 10.0.2 + 10.0.3 diff --git a/src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js b/src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js index 9b46c58e..61b9f790 100644 --- a/src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js +++ b/src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js @@ -555,12 +555,13 @@ export function toImage(id, mimeType) { } export function dispose(id) { - const chart = Data.get(id) + const d = Data.get(id) Data.remove(id) BootstrapBlazor.Chart.removeOptionsById(id); - if (chart) { - EventHandler.off(window, 'resize', chart.resizeHandler) + if (d) { + const { chart, chart: { resizeHandler } } = d; + EventHandler.off(window, 'resize', resizeHandler) chart.destroy() } }