Prevent JSON parse error

This commit is contained in:
Rob Garrison 2018-11-16 07:46:13 -06:00
parent 3d3a2b802a
commit 45aee86eea

View File

@ -157,7 +157,7 @@
// USO can't handle POST requests for style json // USO can't handle POST requests for style json
return download(style.updateUrl, {body: null}) return download(style.updateUrl, {body: null})
// USO may not provide a correctly updated originalMd5 (#555) // 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}));
}); });
} }