Skip to content

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

@opfertunes

Description

@opfertunes

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".... )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions