diff --git a/lib/axe.js b/lib/axe.js index 5495680c..2eee1a05 100644 --- a/lib/axe.js +++ b/lib/axe.js @@ -37,7 +37,7 @@ function start(root){ } GET.turn = function(msg, route, turn){ var tmp = msg['#'], tag = dup.s[tmp], next; - if(!tmp){ return } + if((!tmp)||(!tag)) { return } // Ideas: Save a random seed that sorts the route, store it and the index. // Or indexing on lowest latency is probably better. clearTimeout(tag.lack); if(tag.ack && (tmp = tag['##']) && msg['##'] === tmp){ return } // hashes match, stop asking other peers! @@ -159,4 +159,4 @@ function start(root){ } if(from){ return Object.Map = Map } (Object.Map = function(){ this.s = {} }).prototype = {set:function(k,v){this.s[k]=v;return this},get:function(k){return this.s[k]},delete:function(k){delete this.s[k]}}; -}()); \ No newline at end of file +}());