diff options
Diffstat (limited to 'ext/js')
| -rw-r--r-- | ext/js/dom/sandbox/css-style-applier.js | 10 | 
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; +        }      }      /** |