gun icon indicating copy to clipboard operation
gun copied to clipboard

Setting options.uuid in constructor throws Error: Invalid graph!

Open i001962 opened this issue 3 years ago • 3 comments

const newGun1 = Gun({
  uuid: function () {
    return Math.floor(Math.random() * 4294967296);
  }
})

undefined gun.js:986 Error: Invalid graph! '#0df00f07...' no node.

Yet it looks like the uuid function is set.

No Error message is thrown if options.uuid are set after the constructor has been initialized.

i001962 avatar Jun 17 '21 05:06 i001962

@i001962 thanks for reporting this!

Somebody willing to quickly toss a unit test PR in, @rogowski already done all the work of making example showcase templates: https://github.com/amark/gun/pull/878/files .

amark avatar Jun 17 '21 05:06 amark

Yeah I looked at that link and had no idea what you are asking me to do. lol I need a bit more instruction to get that unit test PR thing into next issue I report.

i001962 avatar Jun 17 '21 05:06 i001962

Checked back in on this issue today and it is not an issue on the manhattan branch. Leaving open for the case you want a unit test PR before closing.

I looked into creating a test but got stuck.

i001962 avatar Aug 10 '21 20:08 i001962