Ver código fonte

check if cachedAttribute is undefined

Gregg Tavares 5 anos atrás
pai
commit
f53774aa80
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      src/renderers/webgl/WebGLBindingStates.js

+ 2 - 0
src/renderers/webgl/WebGLBindingStates.js

@@ -175,6 +175,8 @@
 			const cachedAttribute = cachedAttributes[ key ];
 			const geometryAttribute = geometryAttributes[ key ];
 
+			if ( cachedAttribute === undefined ) return true;
+
 			if ( cachedAttribute.attribute !== geometryAttribute ) return true;
 
 			if ( cachedAttribute.data !== geometryAttribute.data ) return true;