Fix uncaught error in copyStickerToAttachments

This commit is contained in:
Fedor Indutny 2021-10-07 10:08:55 -07:00 committed by GitHub
parent 0f9242670c
commit 0d5ef38e52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View file

@ -769,7 +769,9 @@ export async function copyStickerToAttachments(
size,
} = await window.Signal.Migrations.copyIntoAttachmentsDirectory(absolutePath);
const data = window.Signal.Migrations.loadAttachmentData(path);
const { data } = await window.Signal.Migrations.loadAttachmentData({
path,
});
let contentType: MIMEType;
const sniffedMimeType = sniffImageMimeType(data);