git://git.onelab.eu
/
myslice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d9ce95
)
manifold.js : if a record has no key matching the metadata, drop the object instead...
author
Loic Baron
<loic.baron@lip6.fr>
Sat, 4 Oct 2014 09:14:22 +0000
(11:14 +0200)
committer
Loic Baron
<loic.baron@lip6.fr>
Sat, 4 Oct 2014 09:14:22 +0000
(11:14 +0200)
manifoldapi/static/js/manifold.js
patch
|
blob
|
history
diff --git
a/manifoldapi/static/js/manifold.js
b/manifoldapi/static/js/manifold.js
index
74fb5d9
..
e2b06cf
100644
(file)
--- a/
manifoldapi/static/js/manifold.js
+++ b/
manifoldapi/static/js/manifold.js
@@
-1223,6
+1223,11
@@
var manifold = {
}
key = manifold.metadata.get_key(new_object);
}
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);
record.hashCode = manifold.record_hashcode(key.sort());
record.equals = manifold.record_equals(key);