about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-11-28 14:56:22 +0100
committerThibG <thib@sitedethib.com>2018-11-28 22:36:01 +0100
commit39c8a71df80d303ee08d24b3ce3a66400a1dcc0b (patch)
treed865fb9ca48412330d7b6e3d7a1de4918b79d1ab /app/javascript/flavours/glitch
parentc18bb5d2453a74a2b3dcfc6cfb1d8e9a38a2f810 (diff)
Do not crash the whole UI when loading an invalid column
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/features/ui/components/bundle.js5
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]) {