浏览代码

Add a warning and ignore duplicate node IDs.

Addresses the "too much recursion" error in issue #14453
Quentin Quaadgras 7 年之前
父节点
当前提交
73bb970ee3
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      examples/js/loaders/ColladaLoader.js

+ 5 - 1
examples/js/loaders/ColladaLoader.js

@@ -3183,7 +3183,11 @@ THREE.ColladaLoader.prototype = {
 
 			}
 
-			library.nodes[ data.id ] = data;
+			if (hasNode(data.id)) {
+				console.warn("Duplicate id ", data.id, "ignoring")
+			} else {
+				library.nodes[ data.id ] = data;
+			}
 
 			return data;