diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-11-07 09:16:38 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-11-07 09:16:38 -0800 |
commit | 8f995194bbf23a074a901c8fdaf4ddad22370dd3 (patch) | |
tree | 73ff1eefded2ab79562d4aa7a1a0744ea209b751 /ext/bg/js/util.js | |
parent | a18f3be559b9a8298f93f04837d400a1fff0b2b9 (diff) |
WIP
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r-- | ext/bg/js/util.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index e99cdeab..8a21b264 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -112,6 +112,7 @@ function loadJson(url) { return new Promise((resolve, reject) => { const xhr = new XMLHttpRequest(); xhr.addEventListener('load', () => resolve(JSON.parse(xhr.responseText))); + xhr.addEventListener('error', () => reject('failed to execute network request')); xhr.open('GET', chrome.extension.getURL(url)); xhr.send(); }); |