From 8568018935adbf5f59d9bf9a64069d7fa9821b04 Mon Sep 17 00:00:00 2001
From: Hinaloe <hina@hinaloe.net>
Date: Mon, 4 Nov 2019 20:58:19 +0900
Subject: [PATCH] dont crash with null-ref (#12274)

---
 app/javascript/mastodon/features/ui/index.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js
index 791ff9a2e5..a45ba91eb2 100644
--- a/app/javascript/mastodon/features/ui/index.js
+++ b/app/javascript/mastodon/features/ui/index.js
@@ -164,7 +164,9 @@ class SwitchingColumnsArea extends React.PureComponent {
   }
 
   setRef = c => {
-    this.node = c.getWrappedInstance();
+    if (c) {
+      this.node = c.getWrappedInstance();
+    }
   }
 
   render () {
-- 
GitLab