We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31d923d commit c6d8f64Copy full SHA for c6d8f64
packages/repl/src/lib/Output/Viewer.svelte
@@ -193,12 +193,17 @@
193
return untrack(() => original[method].apply(this, v));
194
}
195
196
- const component = mount(App, { target: document.body });
197
- window.__unmount_previous = () => {
198
- for (const method of console_methods) {
199
- console[method] = original[method];
+ let component;
+ try {
+ component = mount(App, { target: document.body });
+ } finally {
200
+ window.__unmount_previous = () => {
201
+ for (const method of console_methods) {
202
+ console[method] = original[method];
203
+ }
204
+ if (component) unmount(component);
205
+ window.__unmount_previous = null;
206
- unmount(component);
207
208
209
//# sourceURL=playground:output
0 commit comments