mirror of
https://github.com/amark/gun.git
synced 2025-06-07 14:46:44 +00:00
new branch
This commit is contained in:
parent
e9e8804de8
commit
ee04f3a9cd
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@ npm-debug.log
|
|||||||
*data.json
|
*data.json
|
||||||
*.db
|
*.db
|
||||||
.idea/
|
.idea/
|
||||||
|
*.bak
|
||||||
|
*.new
|
1
gun.js
1
gun.js
@ -559,6 +559,7 @@
|
|||||||
if(!opt.end && Gun.obj.empty(delta, Gun._.meta)){ return }
|
if(!opt.end && Gun.obj.empty(delta, Gun._.meta)){ return }
|
||||||
if($$.key){ node = Gun.union.pseudo($.key, gun.__.key.s[$.key]) || node }
|
if($$.key){ node = Gun.union.pseudo($.key, gun.__.key.s[$.key]) || node }
|
||||||
if(opt.change){ node = delta || node }
|
if(opt.change){ node = delta || node }
|
||||||
|
//root.console.log("ON IT BABY!", $$, node);
|
||||||
cb.call($$.gun || gun, Gun.obj.copy($$.field? node[$$.field] : node), $$.field || $$.at);
|
cb.call($$.gun || gun, Gun.obj.copy($$.field? node[$$.field] : node), $$.field || $$.at);
|
||||||
})(gun.__.graph[$.soul], $);
|
})(gun.__.graph[$.soul], $);
|
||||||
if(!opt.once){ gun.__.on($.soul).event(ctx[$.soul]) }
|
if(!opt.once){ gun.__.on($.soul).event(ctx[$.soul]) }
|
||||||
|
@ -1836,6 +1836,19 @@ describe('Gun', function(){
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("gun put null path on put sub object", function(done){ // consensus4's bug
|
||||||
|
var gun = Gun();
|
||||||
|
//Gun.log.verbose = true;
|
||||||
|
var game = gun.put({board: null, teamA: null, teamB: null, turn: null}).key('the/game');
|
||||||
|
game.path('board').on(function(board){
|
||||||
|
console.log("board updated", board);
|
||||||
|
});
|
||||||
|
setTimeout(function(){
|
||||||
|
//game.path('board').put({11: ' ', 22: ' ', 33: 'A'});
|
||||||
|
game.put({board: {11: ' ', 22: ' ', 33: 'A'}});
|
||||||
|
},100);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Streams', function(){
|
describe('Streams', function(){
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user