Skip to content
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

fix(runtime-core): watching multiple values - handle undefined as initial values #7071

Closed
wants to merge 2 commits into from

Conversation

webfansplz
Copy link
Member

Closes #7070

@webfansplz webfansplz changed the title fix(runtime-core): watching multiple values - handle undefined as initial values fix(runtime-core): watching multiple values - handle undefined as initial values Nov 9, 2022
@netlify
Copy link

netlify bot commented Nov 9, 2022

Deploy Preview for vuejs-coverage failed.

Name Link
🔨 Latest commit 6982ba4
🔍 Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/636b75304093540008c9468a

@LinusBorg
Copy link
Member

@KaelWD Looks good, wdyt?

@KaelWD
Copy link
Contributor

KaelWD commented Nov 9, 2022

Looks good, I wonder if there's a way to do const INITIAL_WATCHER_VALUE_ARRAY = [] though instead of all the extra conditions and new arrays. Before #5033 it was expect(oldVal).toMatchObject([]) which would also be fine unless someone cares about .length of that array.

@yyx990803
Copy link
Member

Thanks for the PR! I believe the length of the initial old value array does not matter, so an empty array should suffice. See 23e85e2

@yyx990803 yyx990803 closed this Nov 9, 2022
@webfansplz webfansplz deleted the fix-watch-2 branch November 9, 2022 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breaking change in 3.2.42 - immediate multiple watcher oldValue is undefined
5 participants