]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] dont crash with null-ref
authorHinaloe <hina@hinaloe.net>
Mon, 4 Nov 2019 11:58:19 +0000 (20:58 +0900)
committerThibaut Girka <thib@sitedethib.com>
Wed, 6 Nov 2019 13:50:27 +0000 (14:50 +0100)
Port 8568018935adbf5f59d9bf9a64069d7fa9821b04 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/ui/index.js

index e5925a484d41f21cb69b727d26e9a7cbf0844d1e..646def8f293633606caa454184c28f2e7b66159c 100644 (file)
@@ -174,7 +174,9 @@ class SwitchingColumnsArea extends React.PureComponent {
   }
 
   setRef = c => {
-    this.node = c.getWrappedInstance();
+    if (c) {
+      this.node = c.getWrappedInstance();
+    }
   }
 
   render () {