浏览代码

Fix incorrect variable reference. "attribute" -> "oldAttribute"

Garrett Johnson 6 年之前
父节点
当前提交
c20dff3314
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/BufferGeometry.js

+ 1 - 1
src/core/BufferGeometry.js

@@ -1028,7 +1028,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 			var oldAttribute = this.getAttribute( name );
 			var attribute;
 
-			var buffer = new attribute.array.constructor( attrArrays[ name ] );
+			var buffer = new oldAttribute.array.constructor( attrArrays[ name ] );
 			if ( oldAttribute.isInterleavedBufferAttribute ) {
 
 				attribute = new THREE.BufferAttribute( buffer, oldAttribute.itemSize, oldAttribute.itemSize );