-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Inexplicable error when using reduce
on an object
#1033
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
Comments
iOS has had some JIT bugs pop up that affect lodash pre 3.0 and Underscore. |
Ok. That most likely is it. Couldn't find anything via Google related to this issue, so I should work on my Google-fu. I'll close this for now, and will re-open if this issue still comes up. |
Just to put this to rest, this error has disappeared entirely since upping my version. |
Nice! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I run a production site where I capture all client-side exceptions on my server. Currently, I'm trying to debug this error that I can't explain, nor reproduce, so I'm hoping that you guys would have some clue...
I'm doing a reduce operation on an object that looks like this:
Basically, it's a hash of line-items, and I
reduce
it to get the total number of items. Here's my code, copy and pasted.And results in this kind of error message:
Cannot read property "quantity" of undefined
.This error only appears on iPhone Safari, it seems, just by inspecting the browser useragent. Here's the some of the useragents that errored:
I can't reproduce this on my own iPhone. Any idea what's is going on? Maybe because my keys can be parsed as ints, the object gets false interpreted as an Array?
This is on lodash 2.4
The text was updated successfully, but these errors were encountered: