From be9aa44ca8ab359652c2efb0c5331d74feab1ba2 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 26 Aug 2016 23:49:07 +0100 Subject: [PATCH] fix NPE checking tag order --- src/components/structures/RoomSubList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 74ddb879a..45e471314 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -354,7 +354,7 @@ var RoomSubList = React.createClass({ // is run with historical room tag data, after that there should only be undefined // in the list at a time anyway. for (let i = 0; i < list.length; i++) { - if (list[i].tags[self.props.tagName].order === undefined) { + if (list[i].tags[self.props.tagName] && list[i].tags[self.props.tagName].order === undefined) { MatrixClientPeg.get().setRoomTag(list[i].roomId, self.props.tagName, {order: (order + 1.0) / 2.0}).finally(function() { // Do any final stuff here }).fail(function(err) {