Short circuit unused code
isFileEligibleForCast filters out isRawFileFromFileName. Specifically, it filters out HEIC files. So getRenderableImage is a no-op.
This commit is contained in:
@@ -367,15 +367,9 @@ export const getPreviewableImage = async (
|
||||
const livePhoto = await decodeLivePhoto(file, fileBlob);
|
||||
fileBlob = new Blob([livePhoto.image]);
|
||||
}
|
||||
const convertedBlob = await getRenderableImage(
|
||||
file.metadata.title,
|
||||
fileBlob,
|
||||
);
|
||||
fileBlob = convertedBlob;
|
||||
const fileType = await getFileType(
|
||||
new File([fileBlob], file.metadata.title),
|
||||
);
|
||||
|
||||
fileBlob = new Blob([fileBlob], { type: fileType.mimeType });
|
||||
return fileBlob;
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user