Merge pull request #389 from matrix-org/dbkr/room_published_check_controlled

Don't leave isRoomPublished as undefined
pull/21833/head
Richard van der Hoff 2016-08-04 10:42:34 +01:00 committed by GitHub
commit e1fea24fd6
1 changed files with 3 additions and 1 deletions

View File

@ -70,7 +70,9 @@ module.exports = React.createClass({
// is also called from the saving code so we must return the correct value here
// if we have it (although this could race if the user saves before we load whether
// the room is published or not).
isRoomPublished: this._originalIsRoomPublished,
// Default to false if it's undefined, otherwise react complains about changing
// components from uncontrolled to controlled
isRoomPublished: this._originalIsRoomPublished || false,
};
},