summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/js/dom/sandbox/css-style-applier.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/js/dom/sandbox/css-style-applier.js b/ext/js/dom/sandbox/css-style-applier.js
index 84b8450b..375f5ad0 100644
--- a/ext/js/dom/sandbox/css-style-applier.js
+++ b/ext/js/dom/sandbox/css-style-applier.js
@@ -43,7 +43,15 @@ class CssStyleApplier {
* Loads the data file for use.
*/
async prepare() {
- this._styleData = await this._fetchJsonAsset(this._styleDataUrl);
+ let styleData;
+ try {
+ styleData = await this._fetchJsonAsset(this._styleDataUrl);
+ } catch (e) {
+ console.error(e);
+ }
+ if (Array.isArray(styleData)) {
+ this._styleData = styleData;
+ }
}
/**