mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-09-22 00:55:44 +00:00
fix NPE checking tag order
This commit is contained in:
parent
2f375e4f67
commit
be9aa44ca8
@ -354,7 +354,7 @@ var RoomSubList = React.createClass({
|
|||||||
// is run with historical room tag data, after that there should only be undefined
|
// is run with historical room tag data, after that there should only be undefined
|
||||||
// in the list at a time anyway.
|
// in the list at a time anyway.
|
||||||
for (let i = 0; i < list.length; i++) {
|
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() {
|
MatrixClientPeg.get().setRoomTag(list[i].roomId, self.props.tagName, {order: (order + 1.0) / 2.0}).finally(function() {
|
||||||
// Do any final stuff here
|
// Do any final stuff here
|
||||||
}).fail(function(err) {
|
}).fail(function(err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user