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 c822846 commit b5d44afCopy full SHA for b5d44af
packages/svelte/src/internal/client/dev/hmr.js
@@ -1,5 +1,6 @@
1
-import { block, branch, pause_effect } from '../reactivity/effects.js';
+import { block, branch, destroy_effect } from '../reactivity/effects.js';
2
import { set, source } from '../reactivity/sources.js';
3
+import { set_should_intro } from '../render.js';
4
import { get } from '../runtime.js';
5
6
/**
@@ -27,11 +28,13 @@ export function hmr(data, component) {
27
28
if (effect) {
29
// @ts-ignore
30
for (var k in instance) delete instance[k];
- pause_effect(effect);
31
+ destroy_effect(effect);
32
}
33
34
effect = branch(() => {
35
+ set_should_intro(false);
36
Object.assign(instance, component(anchor, props));
37
+ set_should_intro(true);
38
});
39
40
0 commit comments