From 1634de2b544259afd69d044392015c776ff162e7 Mon Sep 17 00:00:00 2001 From: yujiosaka Date: Thu, 26 Dec 2013 13:58:12 +0900 Subject: [PATCH] call old onerror when it's already defined --- public/javascripts/notifier.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/javascripts/notifier.js b/public/javascripts/notifier.js index d7a1e80..6f002d4 100644 --- a/public/javascripts/notifier.js +++ b/public/javascripts/notifier.js @@ -1171,13 +1171,16 @@ printStackTrace.implementation.prototype = { } }; + var oldOnerror = window.onerror; window.onerror = function (message, file, line, code, error) { setTimeout(function () { var e = error || {stack: '()@' + file + ':' + line} e.message = message new Notifier().notify(e); }, 0); - + if (oldOnerror) { + return oldOnerror(message, file, line, code, error); + } return true; }; })(); -- libgit2 0.21.2