Skip to content

Commit a50700b

Browse files
authored
Merge pull request #20291 from Mugen87/dev35
WebGLShadowMap: Ensure undefined check works in render().
2 parents 029877f + c551dd9 commit a50700b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/renderers/webgl/WebGLShadowMap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
9797
const light = lights[ i ];
9898
const shadow = light.shadow;
9999

100-
if ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;
101-
102100
if ( shadow === undefined ) {
103101

104102
console.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' );
105103
continue;
106104

107105
}
108106

107+
if ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;
108+
109109
_shadowMapSize.copy( shadow.mapSize );
110110

111111
const shadowFrameExtents = shadow.getFrameExtents();

0 commit comments

Comments
 (0)