chaplinjs / chaplin

HTML5 application architecture using Backbone.js
http://chaplinjs.org
Other
2.85k stars 231 forks source link

Uncaught TypeError: Cannot read property 'undefined' of undefined #882

Closed ktktok closed 8 years ago

ktktok commented 8 years ago

Sometimes I am getting this error in my application and in ost.io when move from CollectionView. http://i.stack.imgur.com/bou7z.png

paulmillr commented 8 years ago

@goshakkk

goshacmd commented 8 years ago

@ktktok is there a particular page in ost.io that it consistently happens on, or any other navigation flow to that consistently reproduces the issue?

ktktok commented 8 years ago

I found STR: Open http://ost.io/@brunch Click on "brunch" for example Click on browser "back" and "forward" buttons

goshacmd commented 8 years ago

Hm. Couldn't get that to produce anything in both Safari and Chrome

ktktok commented 8 years ago

http://screencast.com/t/fdaBhLR6Z

goshacmd commented 8 years ago

@ktktok I see, the key here seems to be clicking back/forward fast enough before any content on these pages is loaded. Thanks, I was able to reproduce that and will be looking into it

ktktok commented 8 years ago

Thanks!

goshacmd commented 8 years ago

That was happening because this._byId on collection view was deleted during dispose, but some calls to get happened even after that. It's safer to reset _byId to an empty object so that it doesn't raise an error. #890 should fix that.