Mugen87 7 years ago
parent
commit
3fb7c5e055
2 changed files with 10 additions and 10 deletions
  1. 5 5
      src/core/BufferGeometry.js
  2. 5 5
      src/core/Geometry.js

+ 5 - 5
src/core/BufferGeometry.js

@@ -931,11 +931,7 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
 
 
 				data.shapes = [];
 				data.shapes = [];
 
 
-				if ( Array.isArray( shapes ) === false ) {
-
-					data.shapes.push( shapes.uuid );
-
-				} else {
+				if ( Array.isArray( shapes ) ) {
 
 
 					for ( var i = 0, l = shapes.length; i < l; i ++ ) {
 					for ( var i = 0, l = shapes.length; i < l; i ++ ) {
 
 
@@ -945,6 +941,10 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
 
 
 					}
 					}
 
 
+				} else {
+
+					data.shapes.push( shapes.uuid );
+
 				}
 				}
 
 
 			}
 			}

+ 5 - 5
src/core/Geometry.js

@@ -1017,11 +1017,7 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
 
 
 				data.shapes = [];
 				data.shapes = [];
 
 
-				if ( Array.isArray( shapes ) === false ) {
-
-					data.shapes.push( shapes.uuid );
-
-				} else {
+				if ( Array.isArray( shapes ) ) {
 
 
 					for ( var i = 0, l = shapes.length; i < l; i ++ ) {
 					for ( var i = 0, l = shapes.length; i < l; i ++ ) {
 
 
@@ -1031,6 +1027,10 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
 
 
 					}
 					}
 
 
+				} else {
+
+					data.shapes.push( shapes.uuid );
+
 				}
 				}
 
 
 			}
 			}