File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -199,11 +199,12 @@ export function check_dirtiness(reaction) {
199
199
var dependency ;
200
200
var is_disconnected = ( flags & DISCONNECTED ) !== 0 ;
201
201
var is_unowned_connected = is_unowned && active_effect !== null && ! skip_reaction ;
202
+ var length = dependencies . length ;
202
203
203
204
// If we are working with a disconnected or an unowned signal that is now connected (due to an active effect)
204
205
// then we need to re-connect the reaction to the dependency
205
206
if ( is_disconnected || is_unowned_connected ) {
206
- for ( i = 0 ; i < dependencies . length ; i ++ ) {
207
+ for ( i = 0 ; i < length ; i ++ ) {
207
208
dependency = dependencies [ i ] ;
208
209
209
210
if ( ! dependency ?. reactions ?. includes ( reaction ) ) {
@@ -216,7 +217,7 @@ export function check_dirtiness(reaction) {
216
217
}
217
218
}
218
219
219
- for ( i = 0 ; i < dependencies . length ; i ++ ) {
220
+ for ( i = 0 ; i < length ; i ++ ) {
220
221
dependency = dependencies [ i ] ;
221
222
222
223
if ( check_dirtiness ( /** @type {Derived } */ ( dependency ) ) ) {
You can’t perform that action at this time.
0 commit comments