fix tag unsetting https://github.com/vector-im/vector-web/issues/1499 - HOW DID THIS EVER WORK?!?!

pull/21833/head
Matthew Hodgson 2016-05-31 21:44:11 +01:00
parent b74d690035
commit 2662ca36f9
1 changed files with 2 additions and 2 deletions

View File

@ -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":