File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
packages/svelte/src/internal/client/reactivity Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -130,17 +130,11 @@ export function async_derived(fn, location) {
130
130
131
131
prev = promise ;
132
132
133
- var restore = capture ( ) ;
134
-
135
133
var batch = /** @type {Batch } */ ( current_batch ) ;
136
134
var ran = boundary . ran ;
137
135
138
136
if ( should_suspend ) {
139
- if ( ! ran ) {
140
- boundary . increment ( ) ;
141
- } else {
142
- batch . increment ( ) ;
143
- }
137
+ ( ran ? batch : boundary ) . increment ( ) ;
144
138
}
145
139
146
140
/**
@@ -154,15 +148,10 @@ export function async_derived(fn, location) {
154
148
return ;
155
149
}
156
150
157
- restore ( ) ;
158
151
from_async_derived = null ;
159
152
160
153
if ( should_suspend ) {
161
- if ( ! ran ) {
162
- boundary . decrement ( ) ;
163
- } else {
164
- batch . decrement ( ) ;
165
- }
154
+ ( ran ? batch : boundary ) . decrement ( ) ;
166
155
}
167
156
168
157
if ( ran ) batch . restore ( ) ;
You can’t perform that action at this time.
0 commit comments