diff --git a/app/components/InputRich.js b/app/components/InputRich.js index 9022a709e..7649ff1ef 100644 --- a/app/components/InputRich.js +++ b/app/components/InputRich.js @@ -30,8 +30,17 @@ class InputRich extends React.Component { }; loadEditor = async () => { - const EditorImport = await import('./Editor'); - this.editorComponent = EditorImport.default; + try { + const EditorImport = await import('./Editor'); + this.editorComponent = EditorImport.default; + } catch (err) { + console.error(err); + + // If the editor bundle fails to load then reload the entire window. This + // can happen if a deploy happens between the user loading the initial JS + // bundle and the async-loaded editor JS bundle as the hash will change. + window.location.reload(); + } }; render() {