File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -306,8 +306,11 @@ function needsToRecompute(target: Computed | Effect): boolean {
306
306
// Check the dependencies for changed values. The dependency list is already
307
307
// in order of use. Therefore if multiple dependencies have changed values, only
308
308
// the first used dependency is re-evaluated at this point.
309
- let node = target . _sources ;
310
- while ( node !== undefined ) {
309
+ for (
310
+ let node = target . _sources ;
311
+ node !== undefined ;
312
+ node = node . _nextSource
313
+ ) {
311
314
// If there's a new version of the dependency before or after refreshing,
312
315
// or the dependency has something blocking it from refreshing at all (e.g. a
313
316
// dependency cycle), then we need to recompute.
@@ -316,13 +319,12 @@ function needsToRecompute(target: Computed | Effect): boolean {
316
319
! node . _source . _refresh ( ) ||
317
320
node . _source . _version !== node . _version
318
321
) {
319
- break ;
322
+ return true ;
320
323
}
321
- node = node . _nextSource ;
322
324
}
323
325
// If none of the dependencies have changed values since last recompute then the
324
326
// there's no need to recompute.
325
- return node !== undefined ;
327
+ return false ;
326
328
}
327
329
328
330
function prepareSources ( target : Computed | Effect ) {
You can’t perform that action at this time.
0 commit comments