stefangabos/Zebra_Database

window.onload being called infinitely

Closed this issue · 4 comments

on chrome the window.onload is hitting the max callstack in /public/javascript/database.js

weird, i am using this on chrome everyday...are you sure there is nothing else?

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.

ok, i will make sure to prevent this from happening in these cases

should be fixed now