mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Limit JS error logging
This commit is contained in:
parent
21dfd43c81
commit
b1338555fd
@ -57,8 +57,14 @@
|
||||
var NINJA = NINJA || {};
|
||||
NINJA.fontSize = 9;
|
||||
NINJA.isRegistered = {{ \Utils::isRegistered() ? 'true' : 'false' }};
|
||||
NINJA.loggedErrorCount = 0;
|
||||
|
||||
window.onerror = function (errorMsg, url, lineNumber, column, error) {
|
||||
if (NINJA.loggedErrorCount > 5) {
|
||||
return;
|
||||
}
|
||||
NINJA.loggedErrorCount++;
|
||||
|
||||
// Error in hosted third party library
|
||||
if (errorMsg.indexOf('Script error.') > -1) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user