Fix hit detection for images with missing size

This commit is contained in:
Szabo Bogdan committed 2020-03-26 21:23:23 +01:00
1 parent fbe7b0bd78
commit 6aa398cbec
2 files changed
+40 -12

No files matched your search

+4
View File
@@ -65,6 +65,10 @@ export function createHitDetectionImageData(size, transforms, features, styleFun
const image = originalStyle.getImage();
if (image) {
const imgSize = image.getImageSize();
if (!imgSize) {
continue;
}
const canvas = document.createElement('canvas');
canvas.width = imgSize[0];
canvas.height = imgSize[1];