Backbone error, Cannot read property 'c18' of undefined
I'm making a massive multi page backbone site.
I'm sometimes re-using collections and views across multiple pages of the site, as if they were controls. I've now done something which is coming up with errors like this,
Cannot read property 'c18' of undefined
At the moment, the c18 is always the same.
I'm also using backbone relational.
Any ideas anyone?
I had weird errors happening when a view was closed before it finished rendering. In your case, it could be that a model was removed before a view finished rendering.
In the future, you could debug this by hacking the Backbone code and printing the CID on View and Model initialization (in the constructor). At least this way you'd know what type of object c18 is.