소스 검색

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;