From b68df0420b29769aacb4f2790da16ea8a01c1efe Mon Sep 17 00:00:00 2001
From: Bruno Windels <brunow@matrix.org>
Date: Thu, 8 Nov 2018 12:25:36 +0100
Subject: [PATCH] fix errors when trying to switch room

---
 src/components/structures/GroupGridView.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/structures/GroupGridView.js b/src/components/structures/GroupGridView.js
index 282919f019..b72e689bc5 100644
--- a/src/components/structures/GroupGridView.js
+++ b/src/components/structures/GroupGridView.js
@@ -28,6 +28,7 @@ export default class RoomGridView extends React.Component {
         this.state = {
             roomStores: OpenRoomsStore.getRoomStores(),
         };
+        this.onRoomsChanged = this.onRoomsChanged.bind(this);
     }
 
     componentWillMount() {
@@ -39,7 +40,7 @@ export default class RoomGridView extends React.Component {
     componentWillUnmount() {
         this._unmounted = true;
         if (this._openRoomsStoreRegistration) {
-            this._openRoomsStoreRegistration.unregister();
+            this._openRoomsStoreRegistration.remove();
         }
         dis.unregister(this._dispatcherRef);
     }