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

findBy returns array #475

Closed
H1D opened this issue May 7, 2018 · 1 comment
Closed

findBy returns array #475

H1D opened this issue May 7, 2018 · 1 comment

Comments

@H1D
Copy link

H1D commented May 7, 2018

findBy returns an array instead of found item as it should

Docs said that it just wraps Ember.Array.findBy but it works more like filterBy

Here is twiddle:
https://ember-twiddle.com/ba47504b322f2e6339f53206a0110627?openFiles=controllers.application.js%2C

@kellyselden
Copy link
Owner

You're not escaping your string properly firstElem: findBy('array',raw('key'),1)

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

2 participants