Comparing version 5.16.0 to 5.16.1
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "5.16.0", | ||
"version": "5.16.1", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "types": "./types/index.d.ts", |
@@ -54,3 +54,5 @@ /** @import { Derived, Reaction, Signal, Value } from '#client' */ | ||
: 'color: grey; font-weight: bold', | ||
typeof value === 'object' && STATE_SYMBOL in value ? snapshot(value, true) : value | ||
typeof value === 'object' && value !== null && STATE_SYMBOL in value | ||
? snapshot(value, true) | ||
: value | ||
); | ||
@@ -57,0 +59,0 @@ |
@@ -199,13 +199,25 @@ /** @import { ComponentContext, Derived, Effect, Reaction, Signal, Source, Value } from '#client' */ | ||
var i; | ||
var dependency; | ||
var is_disconnected = (flags & DISCONNECTED) !== 0; | ||
var is_unowned_connected = is_unowned && active_effect !== null && !skip_reaction; | ||
var length = dependencies.length; | ||
if ((flags & DISCONNECTED) !== 0) { | ||
for (i = 0; i < dependencies.length; i++) { | ||
(dependencies[i].reactions ??= []).push(reaction); | ||
// If we are working with a disconnected or an unowned signal that is now connected (due to an active effect) | ||
// then we need to re-connect the reaction to the dependency | ||
if (is_disconnected || is_unowned_connected) { | ||
for (i = 0; i < length; i++) { | ||
dependency = dependencies[i]; | ||
if (!dependency?.reactions?.includes(reaction)) { | ||
(dependency.reactions ??= []).push(reaction); | ||
} | ||
} | ||
reaction.f ^= DISCONNECTED; | ||
if (is_disconnected) { | ||
reaction.f ^= DISCONNECTED; | ||
} | ||
} | ||
for (i = 0; i < dependencies.length; i++) { | ||
var dependency = dependencies[i]; | ||
for (i = 0; i < length; i++) { | ||
dependency = dependencies[i]; | ||
@@ -216,14 +228,2 @@ if (check_dirtiness(/** @type {Derived} */ (dependency))) { | ||
// If we are working with an unowned signal as part of an effect (due to !skip_reaction) | ||
// and the version hasn't changed, we still need to check that this reaction | ||
// is linked to the dependency source – otherwise future updates will not be caught. | ||
if ( | ||
is_unowned && | ||
active_effect !== null && | ||
!skip_reaction && | ||
!dependency?.reactions?.includes(reaction) | ||
) { | ||
(dependency.reactions ??= []).push(reaction); | ||
} | ||
if (dependency.version > reaction.version) { | ||
@@ -230,0 +230,0 @@ return true; |
@@ -9,3 +9,3 @@ // generated during release, do not modify | ||
*/ | ||
export const VERSION = '5.16.0'; | ||
export const VERSION = '5.16.1'; | ||
export const PUBLIC_VERSION = '5'; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2475448
54628
56
1
28