Skip to content

Commit 0804c69

Browse files
fix: review comments
1 parent 0e8cdd4 commit 0804c69

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/@lwc/engine-core/src/framework/modules/context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function connectContext(vm: VM) {
9696
/**
9797
* The legacy validation behavior was that this check should only
9898
* be performed for runtimes that have provided a trustedContext set.
99-
* However, this resulted in a bug as all component properties were
99+
* However, this resulted in a bug as all object values were
100100
* being considered context in environments where the trustedContext
101101
* set had not been provided. The runtime flag has been added as a killswitch
102102
* in case the fix needs to be reverted.
@@ -142,7 +142,7 @@ export function disconnectContext(vm: VM) {
142142
/**
143143
* The legacy validation behavior was that this check should only
144144
* be performed for runtimes that have provided a trustedContext set.
145-
* However, this resulted in a bug as all component properties were
145+
* However, this resulted in a bug as all object values were
146146
* being considered context in environments where the trustedContext
147147
* set had not been provided. The runtime flag has been added as a killswitch
148148
* in case the fix needs to be reverted.

packages/@lwc/engine-core/src/framework/mutation-tracker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ export function componentValueObserved(vm: VM, key: PropertyKey, target: any = {
4848
/**
4949
* The legacy validation behavior was that this check should only
5050
* be performed for runtimes that have provided a trustedSignals set.
51-
* However, this resulted in a bug as all component properties were
51+
* However, this resulted in a bug as all object values were
5252
* being considered signals in environments where the trustedSignals
5353
* set had not been defined. The runtime flag has been added as a killswitch
5454
* in case the fix needs to be reverted.
5555
*/
5656
if (
57-
(lwcRuntimeFlags.ENABLE_LEGACY_SIGNAL_CONTEXT_VALIDATION &&
58-
legacyIsTrustedSignal(target)) ||
59-
(!lwcRuntimeFlags.ENABLE_LEGACY_SIGNAL_CONTEXT_VALIDATION && isTrustedSignal(target))
57+
lwcRuntimeFlags.ENABLE_LEGACY_SIGNAL_CONTEXT_VALIDATION
58+
? legacyIsTrustedSignal(target)
59+
: isTrustedSignal(target)
6060
) {
6161
// Subscribe the template reactive observer's notify method, which will mark the vm as dirty and schedule hydration.
6262
subscribeToSignal(component, target as Signal<unknown>, tro.notify.bind(tro));

packages/@lwc/shared/src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function addTrustedContext(contextParticipant: object) {
5454
/**
5555
* The legacy validation behavior was that this check should only
5656
* be performed for runtimes that have provided a trustedContext set.
57-
* However, this resulted in a bug as all component properties were
57+
* However, this resulted in a bug as all object values were
5858
* being considered context in environments where the trustedContext
5959
* set had not been provided. The runtime flag has been added as a killswitch
6060
* in case the fix needs to be reverted.

packages/@lwc/shared/src/signals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function addTrustedSignal(signal: object) {
2222
/**
2323
* The legacy validation behavior was that this check should only
2424
* be performed for runtimes that have provided a trustedSignals set.
25-
* However, this resulted in a bug as all component properties were
25+
* However, this resulted in a bug as all object values were
2626
* being considered signals in environments where the trustedSignals
2727
* set had not been defined. The runtime flag has been added as a killswitch
2828
* in case the fix needs to be reverted.

0 commit comments

Comments
 (0)