File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -324,11 +324,13 @@ export class RawImage {
324324 // the user passed a null value in.
325325 // This allows users to pass in something like `resize(320, null)` to
326326 // resize to 320 width, but maintain aspect ratio.
327- if ( isNullishDimension ( width ) && isNullishDimension ( height ) ) {
327+ const nullish_width = isNullishDimension ( width ) ;
328+ const nullish_height = isNullishDimension ( height ) ;
329+ if ( nullish_width && nullish_height ) {
328330 return this ;
329- } else if ( isNullishDimension ( width ) ) {
331+ } else if ( nullish_width ) {
330332 width = ( height / this . height ) * this . width ;
331- } else if ( isNullishDimension ( height ) ) {
333+ } else if ( nullish_height ) {
332334 height = ( width / this . width ) * this . height ;
333335 }
334336
You can’t perform that action at this time.
0 commit comments