From 767120a555e7dd7145019f28462991fdad43a927 Mon Sep 17 00:00:00 2001 From: burstfreeze <87532537+burstfreeze@users.noreply.github.com> Date: Fri, 29 Apr 2022 15:02:37 +0200 Subject: [PATCH] fix: `undefined` on unpin action (#1551) --- src/Utils/chat-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/chat-utils.ts b/src/Utils/chat-utils.ts index 5989290..82d5af0 100644 --- a/src/Utils/chat-utils.ts +++ b/src/Utils/chat-utils.ts @@ -598,7 +598,7 @@ export const processSyncActions = ( map['creds.update'].me = { ...me, name: action?.pushNameSetting?.name! } } } else if(action?.pinAction) { - update.pin = action.pinAction?.pinned ? toNumber(action.timestamp) : undefined + update.pin = action.pinAction?.pinned ? toNumber(action.timestamp) : null } else if(action?.unarchiveChatsSetting) { map['creds.update'] = map['creds.update'] || { } map['creds.update'].accountSettings = { unarchiveChats: !!action.unarchiveChatsSetting.unarchiveChats }