window.onload being called infinitely
Closed this issue · 4 comments
BHare1985 commented
on chrome the window.onload is hitting the max callstack in /public/javascript/database.js
stefangabos commented
weird, i am using this on chrome everyday...are you sure there is nothing else?
BHare1985 commented
Took another look; I've confirmed it's because I have 2 classes that I am constructing, each one with their own copy of the a Zebra_Database() instance on a single page, so database.js gets injected into the page twice (because _debug() is ran twice) and that's whats causing it.
Interestingly, if I just comment out orgOnLoad = window.onload;
then it's fine and the formatter still works with no issues.
stefangabos commented
ok, i will make sure to prevent this from happening in these cases
stefangabos commented
should be fixed now