Browse Source

Fixed JSON.stringify( object ).

See #8428.
tschw 9 years ago
parent
commit
8a4d4773f2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/core/Object3D.js

+ 3 - 1
src/core/Object3D.js

@@ -546,7 +546,9 @@ THREE.Object3D.prototype = {
 
 
 	toJSON: function ( meta ) {
 	toJSON: function ( meta ) {
 
 
-		var isRootObject = ( meta === undefined );
+		var isRootObject = ( meta === undefined || meta === '' );
+		// when meta is an empty string, this method has been called from
+		// within JSON.stringify
 
 
 		var output = {};
 		var output = {};