Fix crash with resized images over the canvas size limitation

This commit is contained in:
Mitchell McCaffrey 2021-02-14 08:50:27 +11:00
parent 3b30cc3882
commit c10a818d65

View File

@ -183,14 +183,16 @@ function SelectMapModal({
file.type,
resolution.quality
);
const resizedBuffer = await blobToBuffer(resized.blob);
resolutions[resolution.id] = {
file: resizedBuffer,
width: resized.width,
height: resized.height,
type: "file",
id: resolution.id,
};
if (resized.blob) {
const resizedBuffer = await blobToBuffer(resized.blob);
resolutions[resolution.id] = {
file: resizedBuffer,
width: resized.width,
height: resized.height,
type: "file",
id: resolution.id,
};
}
}
}