Explorar o código

GLTFExporter: Return an empty object if fails to serialize userData

Takahiro %!s(int64=7) %!d(string=hai) anos
pai
achega
affb727f1e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      examples/js/exporters/GLTFExporter.js

+ 2 - 0
examples/js/exporters/GLTFExporter.js

@@ -342,6 +342,8 @@ THREE.GLTFExporter.prototype = {
 				console.warn( 'THREE.GLTFExporter: userData of \'' + object.name + '\' ' +
 				console.warn( 'THREE.GLTFExporter: userData of \'' + object.name + '\' ' +
 					'won\'t be serialized because of JSON.stringify error - ' + error.message );
 					'won\'t be serialized because of JSON.stringify error - ' + error.message );
 
 
+				return {};
+
 			}
 			}
 
 
 		}
 		}