Browse Source

Add a warning and ignore duplicate node IDs.

Addresses the "too much recursion" error in issue #14453
Quentin Quaadgras 7 years ago
parent
commit
73bb970ee3
1 changed files with 5 additions and 1 deletions
  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;