From a258a3874b87351b06787945536e9b27b553d501 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 4 Jan 2021 11:51:27 +0000 Subject: [PATCH] Use objectShallowClone --- src/components/views/rooms/RoomList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/RoomList.tsx b/src/components/views/rooms/RoomList.tsx index 4a4afbc5ac..2d6396c83f 100644 --- a/src/components/views/rooms/RoomList.tsx +++ b/src/components/views/rooms/RoomList.tsx @@ -223,7 +223,7 @@ export default class RoomList extends React.PureComponent { }; // 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 { } 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 {