Don't leave isRoomPublished as undefined

As this causes react to consider the component uncontrolled and then
warn when we change it to controlled
This commit is contained in:
David Baker 2016-08-03 18:23:38 +01:00
parent cbfb0ad998
commit 2d936a2850

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,
};
},