Skip to content

Commit d49ffa1

Browse files
committed
fix(base): Add chart.destroy() to fix memory leak. Fixes #25
1 parent 2fff555 commit d49ffa1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Base.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
});
3939
4040
onDestroy(() => {
41+
if (chart) chart.destroy();
4142
chart = null;
4243
});
4344
</script>

0 commit comments

Comments
 (0)