File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
packages/svelte/src/internal/client/reactivity Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 11/** @import { Effect, TemplateNode, Value } from '#client' */
22import { DESTROYED } from '#client/constants' ;
33import { 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' ;
511import { get_boundary } from '../dom/blocks/boundary.js' ;
612import { invoke_error_boundary } from '../error-handling.js' ;
713import {
@@ -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/**
You can’t perform that action at this time.
0 commit comments