Selaa lähdekoodia

fix: there was a runtime error with clipShadows true while clippingPlanes not yet set to an array (#24144)

Co-authored-by: Joe Pea <[email protected]>
LUME Bot 3 vuotta sitten
vanhempi
commit
9203453841
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/renderers/webgl/WebGLShadowMap.js

+ 1 - 1
src/renderers/webgl/WebGLShadowMap.js

@@ -242,7 +242,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 
 		}
 
-		if ( ( _renderer.localClippingEnabled && material.clipShadows === true && material.clippingPlanes.length !== 0 ) ||
+		if ( ( _renderer.localClippingEnabled && material.clipShadows === true && Array.isArray( material.clippingPlanes ) && material.clippingPlanes.length !== 0 ) ||
 			( material.displacementMap && material.displacementScale !== 0 ) ||
 			( material.alphaMap && material.alphaTest > 0 ) ) {