From 54f6d305d759c6911ba69e549a2cb55587951f64 Mon Sep 17 00:00:00 2001 From: lukebarnard Date: Fri, 19 Jan 2018 14:11:05 +0000 Subject: [PATCH] Null-guard for newTag --- src/components/views/rooms/RoomList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 9c66731b06..85b4b52380 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -313,7 +313,7 @@ module.exports = React.createClass({ const newOrder = {}; // Is the tag ordered manually? - if (!newTag.match(/^(m\.lowpriority|im\.vector\.fake\.(invite|recent|direct|archived))$/)) { + if (newTag && !newTag.match(/^(m\.lowpriority|im\.vector\.fake\.(invite|recent|direct|archived))$/)) { const newList = Object.assign({}, this.state.lists[newTag]); // If the room was moved "down" (increasing index) in the same list we