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:
parent
cbfb0ad998
commit
2d936a2850
1 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,9 @@ module.exports = React.createClass({
|
||||||
// is also called from the saving code so we must return the correct value here
|
// 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
|
// if we have it (although this could race if the user saves before we load whether
|
||||||
// the room is published or not).
|
// 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,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue