about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorHinaloe <hina@hinaloe.net>2019-11-04 20:58:19 +0900
committerThibaut Girka <thib@sitedethib.com>2019-11-06 14:50:27 +0100
commitf940c5a1fb983e831a1d2333557369c1d77652c6 (patch)
treecb36327b52ce834565f79232ce60fb12ce0f5eae /app/javascript
parentf2fc7246e12266b9dc4eff682b054372782e986c (diff)
[Glitch] dont crash with null-ref
Port 8568018935adbf5f59d9bf9a64069d7fa9821b04 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/flavours/glitch/features/ui/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js
index e5925a484..646def8f2 100644
--- a/app/javascript/flavours/glitch/features/ui/index.js
+++ b/app/javascript/flavours/glitch/features/ui/index.js
@@ -174,7 +174,9 @@ class SwitchingColumnsArea extends React.PureComponent {
   }
 
   setRef = c => {
-    this.node = c.getWrappedInstance();
+    if (c) {
+      this.node = c.getWrappedInstance();
+    }
   }
 
   render () {