From 10032f18faee4615cbb02e7bda705f392cc5b81f Mon Sep 17 00:00:00 2001 From: guybedford Date: Thu, 9 Feb 2017 09:11:55 +0200 Subject: [PATCH] only call previous onerror if it exists --- src/common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common.js b/src/common.js index 2d84c0ab..8b087150 100644 --- a/src/common.js +++ b/src/common.js @@ -147,7 +147,8 @@ if (isBrowser) { loadingScripts[i].err(msg); return; } - onerror.apply(this, arguments); + if (onerror) + onerror.apply(this, arguments); }; }