You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Use objectShallowClone
This commit is contained in:
@@ -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
|
// 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.updateDmAddRoomAction();
|
||||||
|
|
||||||
this.dispatcherRef = defaultDispatcher.register(this.onAction);
|
this.dispatcherRef = defaultDispatcher.register(this.onAction);
|
||||||
@@ -242,7 +242,7 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private updateDmAddRoomAction() {
|
private updateDmAddRoomAction() {
|
||||||
const dmTagAesthetics = Object.assign({}, TAG_AESTHETICS[DefaultTagID.DM]);
|
const dmTagAesthetics = objectShallowClone(TAG_AESTHETICS[DefaultTagID.DM]);
|
||||||
if (CallHandler.sharedInstance().getSupportsPstnProtocol()) {
|
if (CallHandler.sharedInstance().getSupportsPstnProtocol()) {
|
||||||
dmTagAesthetics.addRoomContextMenu = dmAddRoomContextMenu;
|
dmTagAesthetics.addRoomContextMenu = dmAddRoomContextMenu;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user