Browse Source

source.metadata can be null when cloning.

Brian Zinn 7 years ago
parent
commit
cc42d0db42
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Mesh/babylon.mesh.ts

+ 1 - 1
src/Mesh/babylon.mesh.ts

@@ -189,7 +189,7 @@
                 Tools.DeepCopy(source, this, ["name", "material", "skeleton", "instances", "parent", "uniqueId", "source", "metadata"], ["_poseMatrix", "_source"]);
 
                 // Metadata
-                if (source.metadata.clone) {
+                if (source.metadata && source.metadata.clone) {
                     this.metadata = source.metadata.clone();
                  } else {
                     this.metadata = source.metadata;