From 2662ca36f9902b01b76159adc55ae5fe10d80e3e Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 31 May 2016 21:44:11 +0100 Subject: [PATCH] fix tag unsetting https://github.com/vector-im/vector-web/issues/1499 - HOW DID THIS EVER WORK?!?! --- src/components/views/rooms/RoomSettings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js index fd8bcbfe96..8764700c5a 100644 --- a/src/components/views/rooms/RoomSettings.js +++ b/src/components/views/rooms/RoomSettings.js @@ -34,7 +34,7 @@ module.exports = React.createClass({ getInitialState: function() { var tags = {}; Object.keys(this.props.room.tags).forEach(function(tagName) { - tags[tagName] = {}; + tags[tagName] = ['yep']; }); var areNotifsMuted = false; @@ -180,7 +180,7 @@ module.exports = React.createClass({ // tags if (this.state.tags_changed) { var tagDiffs = ObjectUtils.getKeyValueArrayDiffs(originalState.tags, this.state.tags); - // [ {place: add, key: "m.favourite", val: "yep"} ] + // [ {place: add, key: "m.favourite", val: ["yep"]} ] tagDiffs.forEach(function(diff) { switch (diff.place) { case "add":