manifold.js : if a record has no key matching the metadata, drop the object instead...
authorLoic Baron <loic.baron@lip6.fr>
Sat, 4 Oct 2014 09:14:22 +0000 (11:14 +0200)
committerLoic Baron <loic.baron@lip6.fr>
Sat, 4 Oct 2014 09:14:22 +0000 (11:14 +0200)
manifoldapi/static/js/manifold.js

index 74fb5d9..e2b06cf 100644 (file)
@@ -1223,6 +1223,11 @@ var manifold = {
         }
 
         key = manifold.metadata.get_key(new_object);
+        if (!key){
+            console.log("object type: " + new_object + " has no key");
+            console.log(record);
+            return;
+        }
         record.hashCode = manifold.record_hashcode(key.sort());
         record.equals   = manifold.record_equals(key);