diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-11-28 14:56:22 +0100 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-11-28 22:36:01 +0100 |
commit | 39c8a71df80d303ee08d24b3ce3a66400a1dcc0b (patch) | |
tree | d865fb9ca48412330d7b6e3d7a1de4918b79d1ab /app | |
parent | c18bb5d2453a74a2b3dcfc6cfb1d8e9a38a2f810 (diff) |
Do not crash the whole UI when loading an invalid column
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/bundle.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/bundle.js b/app/javascript/flavours/glitch/features/ui/components/bundle.js index fc88e0c70..8f0d7b8b1 100644 --- a/app/javascript/flavours/glitch/features/ui/components/bundle.js +++ b/app/javascript/flavours/glitch/features/ui/components/bundle.js @@ -52,6 +52,11 @@ class Bundle extends React.Component { load = (props) => { const { fetchComponent, onFetch, onFetchSuccess, onFetchFail, renderDelay } = props || this.props; + if (fetchComponent === undefined) { + this.setState({ mod: null }); + return Promise.resolve(); + } + onFetch(); if (Bundle.cache[fetchComponent.name]) { |