From 0a299ec7e5c8d5ea4bcb9436fc164825d851cfc4 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Fri, 12 Aug 2022 12:44:09 -0700 Subject: [PATCH] Fix assertion in mergeStickerPackRecord --- ts/services/storageRecordOps.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/services/storageRecordOps.ts b/ts/services/storageRecordOps.ts index b41f2952f..0fa069fcc 100644 --- a/ts/services/storageRecordOps.ts +++ b/ts/services/storageRecordOps.ts @@ -1493,8 +1493,8 @@ export async function mergeStickerPackRecord( `newPosition=${stickerPack.position ?? '?'}` ); - if ((!localStickerPack || !wasUninstalled) && isUninstalled) { - assert(localStickerPack?.key, 'Installed sticker pack has no key'); + if (localStickerPack && !wasUninstalled && isUninstalled) { + assert(localStickerPack.key, 'Installed sticker pack has no key'); window.reduxActions.stickers.uninstallStickerPack( localStickerPack.id, localStickerPack.key,