diff --git a/utils/GunSmith/GunSmith.js b/utils/GunSmith/GunSmith.js index 47976e39..9689e868 100644 --- a/utils/GunSmith/GunSmith.js +++ b/utils/GunSmith/GunSmith.js @@ -349,7 +349,17 @@ function createReplica(path, afterMap = false) { if (afterMap) { throw new Error('Cannot call set() after map() on a GunSmith node') } - return this + // @ts-expect-error + const uuid = Gun.text.random() + return this.put( + { + [uuid]: data + }, + ack => { + // eslint-disable-next-line no-unused-expressions + cb && cb(ack) + } + ) }, user(pub) { if (path !== '$root') {