Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the script is loaded twice, it causes an infinite loop #29

Closed
alexlehm opened this issue Mar 6, 2014 · 0 comments
Closed

When the script is loaded twice, it causes an infinite loop #29

alexlehm opened this issue Mar 6, 2014 · 0 comments

Comments

@alexlehm
Copy link

alexlehm commented Mar 6, 2014

The script is not properly guarded against loading it more than once, if it is, the error reporting goes into an infinite loop and reports the first error over and over essentially halting the browser.

The variable fnPreviousOnErrorHandler is overwritten with the error handler of jsErrLog so that the method to call the previous handler will the own handler.

It would be best to put the whole script into the if (!jsErrLog) backets. This way only one "instance" is created and the variables are not overwritten when the script is accidentally loaded twice.

Offbeatmammal added a commit that referenced this issue Mar 9, 2014
Addressing bugs #26, #28 and #29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants