destroy components on change

pull/2179/head
Richard Harris 7 years ago
parent c3d9647fb0
commit 0c6de32217

@ -159,6 +159,14 @@
if (ssr) removeStyles(); if (ssr) removeStyles();
replProxy.eval(`${dom.code} replProxy.eval(`${dom.code}
if (window.component) {
try {
window.component.$destroy();
} catch (err) {
console.error(err);
}
}
document.body.innerHTML = ''; document.body.innerHTML = '';
window.location.hash = ''; window.location.hash = '';
window._svelteTransitionManager = null; window._svelteTransitionManager = null;

Loading…
Cancel
Save