Skip to content

Commit ad5c33b

Browse files
Update packages/@lwc/engine-core/src/framework/vm.ts
Co-authored-by: Ravi Jayaramappa <ravi.jayaramappa@salesforce.com>
1 parent b4f4626 commit ad5c33b

File tree

1 file changed

+2
-2
lines changed
  • packages/@lwc/engine-core/src/framework

1 file changed

+2
-2
lines changed

packages/@lwc/engine-core/src/framework/vm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,8 @@ function flushRehydrationQueue() {
676676
// We want to prevent rehydration from occurring when nodes are detached from the DOM as this can trigger
677677
// unintended side effects, like lifecycle methods being called multiple times.
678678
// For backwards compatibility, we use a flag to control the check.
679-
// 1. When flag is disabled always rehydrate (legacy behavior)
680-
// 2. When flag is enabled only rehydrate when the VM state is connected (fixed behavior)
679+
// 1. When flag is off, always rehydrate (legacy behavior)
680+
// 2. When flag is on, only rehydrate when the VM state is connected (fixed behavior)
681681
if (!lwcRuntimeFlags.DISABLE_DETACHED_REHYDRATION || vm.state === VMState.connected) {
682682
rehydrate(vm);
683683
}

0 commit comments

Comments
 (0)