Fix assertion in mergeStickerPackRecord

This commit is contained in:
Fedor Indutny 2022-08-12 12:44:09 -07:00 committed by GitHub
parent da28b4d6cd
commit 0a299ec7e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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,