-
Notifications
You must be signed in to change notification settings - Fork 767
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
JSON string value of "constructor" throws exception on .fromJS call #124
Comments
lawnsea
added a commit
to WaterfallEngineering/knockout.mapping
that referenced
this issue
Sep 4, 2013
If a mapped observable has a value that is a property of `Object.prototype`, `findBucket` returns that property's value instead of a `simpleObjectLookup` instance. Fix SteveSanderson#124
We hit this as well: the value |
Still happening in current version
var originalData = {
id: 1,
name: "watch"
};
var viewModel = ko.mapping.fromJS(originalData);
|
crissdev
pushed a commit
to crissdev/knockout.mapping
that referenced
this issue
Feb 13, 2015
…ence If a mapped observable has a value that is a property of `Object.prototype`, `findBucket` returns that property's value instead of a `simpleObjectLookup` instance.
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am getting the following error when a data field value is the string "constructor":
Uncaught TypeError: Object function Object() { [native code] } has no method 'get' knockout.mapping-latest.debug.js:770
I am using version v2.3.2.
Here is my code to show how I am calling it:
data.items is an array of objects and the following is the JSON item that is causing this error:
The offending part of the JSON is this;
When I change the string "constructor" to anything else, it works just fine.
The text was updated successfully, but these errors were encountered: