Reputation: 5036
I keep getting the same error when I try to set an attribute but only if the attribute's value already the same as the value I am trying to set it to:
Uncaught TypeError: Object function (obj) { return new wrapper(obj); } has no method 'has'
For example I have the following line:
var s = new SampleModel({"language": "en"});
s.set("language", "en") // this produces the above error
Anyone have any insight into this problem? I am currently using the most recent version of Backbone.js 0.9.1
Upvotes: 0
Views: 1229
Reputation: 72868
@ggreiner and @nikoshr are right... they should have posted answers instead of comments, though.
this error is caused by having an outdated version of Underscore.js. you need to upgrade it to v1.3.1 for use with Backbone v0.9.x
http://documentcloud.github.com/underscore/
Upvotes: 1