mirror of
https://github.com/amark/gun.git
synced 2025-06-05 13:46:43 +00:00
new branch
This commit is contained in:
parent
e9e8804de8
commit
ee04f3a9cd
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,4 +2,6 @@ node_modules/*
|
||||
npm-debug.log
|
||||
*data.json
|
||||
*.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($$.key){ node = Gun.union.pseudo($.key, gun.__.key.s[$.key]) || 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);
|
||||
})(gun.__.graph[$.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(){
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user