mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Merge pull request #172 from PsychoLlama/master
Fix thrown error in `.set`
This commit is contained in:
commit
52463a5a20
1
gun.js
1
gun.js
@ -976,6 +976,7 @@
|
||||
|
||||
Gun.chain.set = function(item, cb, opt){
|
||||
var gun = this, ctx = {}, chain;
|
||||
cb = cb || function(){};
|
||||
if(!Gun.is(item)){ return cb.call(gun, {err: Gun.log('Set only supports node references currently!')}), gun } // TODO: Bug? Should we return not gun on error?
|
||||
(ctx.chain = item.chain()).back = gun;
|
||||
ctx.chain._ = item._;
|
||||
|
Loading…
x
Reference in New Issue
Block a user