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

Merge pull request #20056 from greggman/check-cached-attribute

WebGLBindingStates: check if cachedAttribute is undefined
Mr.doob преди 5 години
родител
ревизия
0dc43355d7
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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;