Null-guard for newTag

pull/21833/head
lukebarnard 2018-01-19 14:11:05 +00:00
parent 00dc077271
commit 54f6d305d7
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ module.exports = React.createClass({
const newOrder = {}; const newOrder = {};
// Is the tag ordered manually? // 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]); const newList = Object.assign({}, this.state.lists[newTag]);
// If the room was moved "down" (increasing index) in the same list we // If the room was moved "down" (increasing index) in the same list we