mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Update gun.js
This commit is contained in:
parent
23f126f219
commit
0aef927eec
8
gun.js
8
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user