-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
fix(reactivity): update iterator to check for completion instead of value presence #13761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughIterator wrapper in arrayInstrumentations now applies wrapValue whenever an iterator result is not done (i.e., checks Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant ReactiveArray
participant Iterator
participant wrapValue
User->>ReactiveArray: for...of / iteration
ReactiveArray->>Iterator: next()
loop while not done
Iterator-->>ReactiveArray: { value, done: false }
Note over ReactiveArray,wrapValue: New behavior: wrap even falsy values\n(condition: !result.done)
ReactiveArray->>wrapValue: wrap(value)
wrapValue-->>ReactiveArray: wrappedValue
ReactiveArray-->>User: wrappedValue
ReactiveArray->>Iterator: next()
end
Iterator-->>ReactiveArray: { value, done: true }
ReactiveArray-->>User: iteration ends (no wrapping)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Could you please add a test case? |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
…alue presence
Summary by CodeRabbit