Fix crash with resized images over the canvas size limitation
This commit is contained in:
parent
3b30cc3882
commit
c10a818d65
@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user