From 45aee86eead1e9879550c5af7c3c576076fb606d Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Fri, 16 Nov 2018 07:46:13 -0600 Subject: [PATCH] Prevent JSON parse error --- background/update.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background/update.js b/background/update.js index 59268a14..c4ae8d5a 100644 --- a/background/update.js +++ b/background/update.js @@ -157,7 +157,7 @@ // USO can't handle POST requests for style json return download(style.updateUrl, {body: null}) // USO may not provide a correctly updated originalMd5 (#555) - .then(text => Object.assign(tryJSONparse(text), {originalMd5: md5})); + .then(text => Object.assign(tryJSONparse(text || '{}'), {originalMd5: md5})); }); }