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

add/remove events always give you back arrays #1428

Merged
merged 1 commit into from Feb 10, 2015
Merged

Conversation

zkat
Copy link
Contributor

@zkat zkat commented Feb 7, 2015

can.List add event should always be an array

Don't trigger remove events on shift/pop for 0-length lists

For add events, include leading undefineds in the 'added' array

Fixes #998

can.List add event should always be an array

Don't trigger remove events on shift/pop for 0-length lists

For add events, include leading undefineds in the 'added' array
@daffl
Copy link
Contributor

daffl commented Feb 9, 2015

Would this be a 3.0 change? I know it's not tested anywhere but wouldn't this break all code that's listening to an add event under the - admittedly wrong - assumption that you only get a single value?

@justinbmeyer
Copy link
Contributor

We document add always getting an array. Our code was broken. This is a bug fix.

@daffl daffl added this to the 2.2.0 milestone Feb 10, 2015
daffl added a commit that referenced this pull request Feb 10, 2015
add/remove events always give you back arrays
@daffl daffl merged commit b03a743 into minor Feb 10, 2015
@daffl daffl deleted the 998-event-docs-and-fixes branch February 10, 2015 01:02
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.

None yet

3 participants