fix(watch): update oldValue before running cb to prevent stale value#12296
fix(watch): update oldValue before running cb to prevent stale value#12296edison1105 merged 4 commits intovuejs:mainfrom
oldValue before running cb to prevent stale value#12296Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-ssr
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
WalkthroughA new test case was added to the Changes
Sequence Diagram(s)sequenceDiagram
participant ReactiveRef as Reactive Reference
participant Watcher as Watcher
participant Callback as Watch Callback
ReactiveRef->>Watcher: Value changes (e.g., to true)
Watcher->>Watcher: Update oldValue = newValue
Watcher->>Callback: Invoke callback (may reset value)
Callback->>ReactiveRef: Optionally reset value (e.g., to false)
loop If value changes again
ReactiveRef->>Watcher: Value changes (again)
Watcher->>Watcher: Update oldValue = newValue
Watcher->>Callback: Invoke callback
end
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
close #12294
Summary by CodeRabbit
Bug Fixes
Tests