From 7b9348a54503700f44992832e8ad7779833628b7 Mon Sep 17 00:00:00 2001 From: eight Date: Wed, 30 Aug 2017 17:40:19 +0800 Subject: [PATCH] Fix: better error message --- js/script-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/script-loader.js b/js/script-loader.js index ea31ba0d..feb56bdf 100644 --- a/js/script-loader.js +++ b/js/script-loader.js @@ -23,7 +23,7 @@ var loadScript = (function () { cache.set(path, script); }; script.onerror = event => { - reject(event); + reject(new Error(`failed to load script: ${path}`)); script.onload = null; script.onerror = null; script.parentNode.removeChild(script);