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(reactivity): add existing index or non-integer prop on Array should not trigger length dependency #1969

Merged
merged 2 commits into from
Aug 26, 2020

Conversation

xxgjzftd
Copy link
Contributor

Fixed the scenarios below:

const observed = reactive(new Array(3))
effect(() => {
  console.log(observed.length)
})
observed.x = 'x'
observed[-1] = 'x'
observed[1] = 1
// all they three statement will trigger the effect which would not be the expected result...

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.

2 participants