diff --git a/lib/unset.js b/lib/unset.js index 98dae1a9..4e4f9ae8 100644 --- a/lib/unset.js +++ b/lib/unset.js @@ -1,10 +1,11 @@ var Gun = (typeof window !== "undefined")? window.Gun : require('../gun'); -const rel_ = Gun.val.link._; // '#' -const node_ = Gun.node._; // '_' +const rel_ = '#'; // '#' +const node_ = '_'; // '_' Gun.chain.unset = function(node){ - if( this && node && node[node_] && node[node_].put && node[node_].put[node_] && node[node_].put[node_][rel_] ) + if( this && node && node[node_] && node[node_].put && node[node_].put[node_] && node[node_].put[node_][rel_] ){ this.put( { [node[node_].put[node_][rel_]]:null} ); + } return this; }