Преглед на файлове

PMREMGenerator: Use logical OR instead of nullish coalescing. (#23488)

Michael Herzog преди 3 години
родител
ревизия
e8de8f09ca
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/extras/PMREMGenerator.js

+ 1 - 1
src/extras/PMREMGenerator.js

@@ -224,7 +224,7 @@ class PMREMGenerator {
 
 		if ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping ) {
 
-			this._setSize( texture.image.length === 0 ? 16 : texture.image[ 0 ].width ?? texture.image[ 0 ].image.width );
+			this._setSize( texture.image.length === 0 ? 16 : ( texture.image[ 0 ].width || texture.image[ 0 ].image.width ) );
 
 		} else { // Equirectangular