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

GLTFExporter: Return an empty object if fails to serialize userData

Takahiro преди 7 години
родител
ревизия
affb727f1e
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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 + '\' ' +
 					'won\'t be serialized because of JSON.stringify error - ' + error.message );
 
+				return {};
+
 			}
 
 		}