Use objectShallowClone

pull/21833/head
David Baker 2021-01-04 11:51:27 +00:00
parent 452fbb076b
commit a258a3874b
1 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
};
// shallow-copy from the template as we need to make modifications to it
this.tagAesthetics = Object.assign({}, TAG_AESTHETICS);
this.tagAesthetics = objectShallowClone(TAG_AESTHETICS);
this.updateDmAddRoomAction();
this.dispatcherRef = defaultDispatcher.register(this.onAction);
@ -242,7 +242,7 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
}
private updateDmAddRoomAction() {
const dmTagAesthetics = Object.assign({}, TAG_AESTHETICS[DefaultTagID.DM]);
const dmTagAesthetics = objectShallowClone(TAG_AESTHETICS[DefaultTagID.DM]);
if (CallHandler.sharedInstance().getSupportsPstnProtocol()) {
dmTagAesthetics.addRoomContextMenu = dmAddRoomContextMenu;
} else {