You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran into this as a bug in Firefox only due to my data which errors as:
TypeError: existing.set is not a function
this is because one of my model.id is 'watch' (for a wrist watch) however Backbone is checking this id in the Collections._byId cache and matching theObject.watch() method.
The console output for Firefox is [native code] whereas Chrome and Safari it is undefined.
This is similar to other bugs/issues such as: #964, #1495, #2296.
I've introduced a check that the return from Collection.get is actually an Object - I can't think why it would ever need to be something else? Pull request coming shortly.
I also investigated using this._byId.hasOwnProperty() however it broke my app. I think that because Collections can be extended the _byId object may not be on 'this' collection.
The text was updated successfully, but these errors were encountered:
Ran into this as a bug in Firefox only due to my data which errors as:
this is because one of my
model.id
is 'watch' (for a wrist watch) however Backbone is checking this id in theCollections._byId
cache and matching theObject.watch()
method.A reduced example is here: http://jsbin.com/akaluh/1/edit
The console output for Firefox is
[native code]
whereas Chrome and Safari it isundefined
.This is similar to other bugs/issues such as: #964, #1495, #2296.
I've introduced a check that the return from
Collection.get
is actually anObject
- I can't think why it would ever need to be something else? Pull request coming shortly.I also investigated using
this._byId.hasOwnProperty()
however it broke my app. I think that because Collections can be extended the_byId
object may not be on 'this' collection.The text was updated successfully, but these errors were encountered: