Skip to content

Commit fe1cc8f

Browse files
committed
fix
1 parent 82fe944 commit fe1cc8f

File tree

1 file changed

+17
-2
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+17
-2
lines changed

packages/svelte/src/internal/client/reactivity/async.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
/** @import { Effect, TemplateNode, Value } from '#client' */
22
import { DESTROYED } from '#client/constants';
33
import { DEV } from 'esm-env';
4-
import { component_context, is_runes, set_component_context } from '../context.js';
4+
import {
5+
component_context,
6+
dev_stack,
7+
is_runes,
8+
set_component_context,
9+
set_dev_stack
10+
} from '../context.js';
511
import { get_boundary } from '../dom/blocks/boundary.js';
612
import { invoke_error_boundary } from '../error-handling.js';
713
import {
@@ -92,6 +98,10 @@ export function capture() {
9298
var previous_hydrate_node = hydrate_node;
9399
}
94100

101+
if (DEV) {
102+
var previous_dev_stack = dev_stack;
103+
}
104+
95105
return function restore() {
96106
set_active_effect(previous_effect);
97107
set_active_reaction(previous_reaction);
@@ -105,6 +115,7 @@ export function capture() {
105115

106116
if (DEV) {
107117
set_from_async_derived(null);
118+
set_dev_stack(previous_dev_stack);
108119
}
109120
};
110121
}
@@ -193,7 +204,11 @@ export function unset_context() {
193204
set_active_effect(null);
194205
set_active_reaction(null);
195206
set_component_context(null);
196-
if (DEV) set_from_async_derived(null);
207+
208+
if (DEV) {
209+
set_from_async_derived(null);
210+
set_dev_stack(null);
211+
}
197212
}
198213

199214
/**

0 commit comments

Comments
 (0)