Skip to content

Commit 770c8be

Browse files
committed
Fixed error Internal server error. Cannot read property 'w' of null
1 parent 312e9c0 commit 770c8be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modifier/applicator/resize.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class Resize extends require('./abstract-applicator') {
2929
width = imageWidth;
3030
height = imageHeight;
3131
} else if (null === width) {
32-
width = height * ((null !== aspectRatio.w ? aspectRatio.w : imageWidth) / (null !== aspectRatio.h ? aspectRatio.h : imageHeight));
32+
width = height * ((null !== aspectRatio ? aspectRatio.w : imageWidth) / (null !== aspectRatio ? aspectRatio.h : imageHeight));
3333
} else if (null === height) {
34-
height = width / ((null !== aspectRatio.w ? aspectRatio.w : imageWidth) / (null !== aspectRatio.h ? aspectRatio.h : imageHeight));
34+
height = width / ((null !== aspectRatio ? aspectRatio.w : imageWidth) / (null !== aspectRatio ? aspectRatio.h : imageHeight));
3535
}
3636

3737
width = parseInt(null !== width ? width * pd : width);

0 commit comments

Comments
 (0)