gun.not() 方法不适用于嵌套节点

gun.not() method does not work with nested nodes

如何使 gun.not() 与嵌套节点一起工作?

我们是否有任何其他技术来初始化嵌套节点?

如果我处理根级节点,.not() 方法有效。但是在嵌套节点的情况下,当我想获取节点值时,我只得到 undefined

var gun = new Gun();
var app = gun.get('app');
var demo = document.getElementById('demo');

deleteDino('dino/velociraptor');
initDino('dino/velociraptor');

app.get('dino/velociraptor').get('statistics').val(function(value) {
  console.log('value', value);
  demo.innerHTML = JSON.stringify(value);
});

function deleteDino (name) {
  app.get(name).put(null);
}

function initDino (name) {
  app.get(name).not(function () {
    app.get(name).put({
     statistics: {
       force: 5,
        speed: 17,
        intelligence: 23
      }
    });
  });
}
<script src="https://rawgit.com/amark/gun/master/gun.js"></script>
<script src="https://rawgit.com/amark/gun/master/lib/not.js"></script>
<p id="demo"></p>

按预期工作。

将'null'放入恐龙名称中意味着它存在。不测试存在性,不测试空白。