From: Thierry Parmentelat Date: Fri, 15 Nov 2013 09:49:29 +0000 (+0100) Subject: issue warning when raise_event_handler is called with query_uuid being undefined X-Git-Tag: myslice-0.3-0~113^2~7^2~7^2~5^2~5 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=11aa60f2a8a51cc4c875e02ac1429e8dbdc34ec6 issue warning when raise_event_handler is called with query_uuid being undefined --- diff --git a/manifold/static/js/manifold.js b/manifold/static/js/manifold.js index 877b69c8..c6e9d41c 100644 --- a/manifold/static/js/manifold.js +++ b/manifold/static/js/manifold.js @@ -769,7 +769,15 @@ var manifold = { raise_event_handler: function(type, query_uuid, event_type, value) { if ((type != 'query') && (type != 'record')) throw 'Incorrect type for manifold.raise_event()'; + // xxx we observe quite a lot of incoming calls with an undefined query_uuid + // this should be fixed upstream + if (query_uuid === undefined) { + messages.warning("undefined query in raise_event_handler"); + return; + } + // notify the change to objects that either listen to this channel specifically, + // or to the wildcard channel var channels = [ manifold.get_channel(type, query_uuid), manifold.get_channel(type, '*') ]; $.each(channels, function(i, channel) {