From 0aef927eecb7845d1052cb05baa23f9bd736f29d Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Tue, 18 Oct 2016 12:11:02 -0700 Subject: [PATCH] Update gun.js --- gun.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gun.js b/gun.js index 6b2a6c02..d51b71ed 100644 --- a/gun.js +++ b/gun.js @@ -370,10 +370,18 @@ var last = act.on.last, tmp; if(last){ if(act.on.map){ + var map = act.on.map, v; + for(var f in map){ v = map[f]; + if(v[1]){ + emit(v[1], act, event, v[2]); + } + } + /* Gun.obj.map(act.on.map, function(v,f){ // TODO: BUG! Gun is not available in this module. //emit(v[0], act, event, v[1]); // below enables more control emit(v[1], act, event, v[2]); }); + */ } else { emit(last, act, event); }