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

objectLookup() + "watch" + Firefox = hilarity #215

Open
opfertunes opened this issue Jul 16, 2016 · 0 comments
Open

objectLookup() + "watch" + Firefox = hilarity #215

opfertunes opened this issue Jul 16, 2016 · 0 comments

Comments

@opfertunes
Copy link

opfertunes commented Jul 16, 2016

First of all this plugin completely rocks... thank you.

I have a complex JSON array that contains the sub-object pasted below, note that it has a value of "watch" for the key "caption".

{"imageId": 558230, "videoId": null, "title": "Shinola", "caption": "watch", "size": [1416, 2048]}

In FireFox (47.0.1), calling ko.mapping.fromJS(), fails at objectLookup() because there is a built-in watch() function on Object.prototype:

var bucket = buckets[bucketKey];

If bucketKey == 'watch', you get back the watch() function (!)

Working on a fix (I posted one earlier that stupidly replaced the Object.prototype... not good if the key is, say "is".... )

opfertunes added a commit to opfertunes/knockout.mapping that referenced this issue Jul 16, 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

1 participant