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

Weird each regression in 2.3.0 #12906

Closed
topaxi opened this issue Feb 3, 2016 · 5 comments
Closed

Weird each regression in 2.3.0 #12906

topaxi opened this issue Feb 3, 2016 · 5 comments

Comments

@topaxi
Copy link
Contributor

topaxi commented Feb 3, 2016

We ran into an issue with the {{#each}} helper after upgrading to 2.3.0.

I'm not 100% sure if it's only happening with DOM File objects but we made a reproducible twiddle here:
https://ember-twiddle.com/9c341eb331bb62b1256b

After selecting files, each filename should appear in the <ul> element. After adding a second one, all previous filenames magically disappear. This worked prior to version 2.3.0 (i.e. 2.2.1).

@mmun
Copy link
Member

mmun commented Feb 3, 2016

If you replace

let foobar = [ ...this.get('elements'), event.target.files[0] ]

with

let foobar = [ ...this.get('elements'), { name: event.target.files[0].name } ]

it works fine. I did a bit of digging and it looks like mandatory setter does not work correctly with the File object.

@topaxi
Copy link
Contributor Author

topaxi commented Feb 4, 2016

Thanks, this way we can at least work around this issue for now 👍

@stefanpenner
Copy link
Member

#12491 may address this (I believe it is still beta or canary right now)

@mmun
Copy link
Member

mmun commented Feb 5, 2016

@stefanpenner You're right. The ember-twiddle works on master and I bisected the fix down to your PR.

@mmun mmun closed this as completed Feb 5, 2016
@rwjblue
Copy link
Member

rwjblue commented Feb 5, 2016

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

No branches or pull requests

4 participants