(sub: Subscriber)
| 351 | } |
| 352 | |
| 353 | function isDirty(sub: Subscriber): boolean { |
| 354 | for (let link = sub.deps; link; link = link.nextDep) { |
| 355 | if ( |
| 356 | link.dep.version !== link.version || |
| 357 | (link.dep.computed && |
| 358 | (refreshComputed(link.dep.computed) || |
| 359 | link.dep.version !== link.version)) |
| 360 | ) { |
| 361 | return true |
| 362 | } |
| 363 | } |
| 364 | // @ts-expect-error only for backwards compatibility where libs manually set |
| 365 | // this flag - e.g. Pinia's testing module |
| 366 | if (sub._dirty) { |
| 367 | return true |
| 368 | } |
| 369 | return false |
| 370 | } |
| 371 | |
| 372 | /** |
| 373 | * Returning false indicates the refresh failed |
no test coverage detected