Skip to content

Commit 04ec7a7

Browse files
committed
component.destroy instead of $destroy in v2
1 parent e073caf commit 04ec7a7

File tree

1 file changed

+1
-1
lines changed
  • packages/repl/src/lib/workers/bundler

1 file changed

+1
-1
lines changed

packages/repl/src/lib/workers/bundler/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ async function bundle(
541541
return new component(options);
542542
}
543543
export function unmount(component) {
544-
component.$destroy();
544+
component.${svelte.VERSION.split('.')[0] < '3' ? 'destroy' : '$destroy'}();
545545
styles.forEach(style => style.remove());
546546
}
547547
export function untrack(fn) {

0 commit comments

Comments
 (0)