X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifoldapi%2Fstatic%2Fjs%2Fmanifold.js;fp=manifoldapi%2Fstatic%2Fjs%2Fmanifold.js;h=01b48f5157ec843a151723ab1dca40f4ce665285;hb=d9c4cf9cd7f3269068e048563b2975d26af2ae70;hp=ca111de729f09b61e2fe9e36d9d13edf59c7bc9f;hpb=aad516bfc9396270961493b33a875f7cd2a3f941;p=myslice.git diff --git a/manifoldapi/static/js/manifold.js b/manifoldapi/static/js/manifold.js index ca111de7..01b48f51 100644 --- a/manifoldapi/static/js/manifold.js +++ b/manifoldapi/static/js/manifold.js @@ -33,13 +33,13 @@ Array.prototype.equals = function (array) { if (this[i] instanceof Array && array[i] instanceof Array) { // recurse into the nested arrays if (!this[i].equals(array[i])) - return false; - } - else if (this[i] != array[i]) { + return false; + } + else if (this[i] != array[i]) { // Warning - two different object instances will never be equal: {x:20} != {x:20} - return false; - } - } + return false; + } + } return true; } @@ -360,6 +360,7 @@ function QueryStore() { //var key = manifold.metadata.get_key(query_ext.query.object); var record_key_value = manifold.record_get_value(record, record_key); + query_ext.records.put(record_key_value, record); if (!(query_ext.state.get(record_key_value))) @@ -1115,6 +1116,9 @@ var manifold = { * otherwise, publish the main object as well as subqueries * XXX how much recursive are we ? */ + if (records == null){ + records = Array(); + } if (manifold.pubsub_debug) messages.debug (">>>>> publish_result_rec " + query.object); if (manifold.query_expects_unique_result(query)) {