-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Bug: attributes inherited from Object.prototype #1495
Comments
Whole bunch of issues here, |
I'm using this.attributes = typeof Object.create === 'function' ? Object.create(null) : {}; A patch that will support old ie is much more sophisticated. |
Yep -- not so much a bug as a known limitation. Take care with your attribute keys. Making your proposed patch would cause working code in webkit / firefox to error in internet explorer, a situation we'd like to avoid as much as possible. |
Why do not use: get: function(attr) {
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
return this.attributes[attr];
} else {
return void 0;
}
} |
The text was updated successfully, but these errors were encountered: