Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?] wrong key path in error message #1320

Open
rozek opened this issue May 14, 2023 · 1 comment
Open

[Bug?] wrong key path in error message #1320

rozek opened this issue May 14, 2023 · 1 comment

Comments

@rozek
Copy link

rozek commented May 14, 2023

when trying

  const sharedData = Gun.get('sharingTest').get('sharedData')

  const TestObject = {
    'null':       null,
    'boolean':    true,
    'number':     1.23,
    'string':     'Hi',
    'object':     { 'null':null, 'boolean':false, 'number':1.23, 'string':'Hi' },
message:undefined,
  }

  sharedData.put(TestObject)

I get the following error message on the browser console:

Invalid data: undefined at sharingTest.sharedData.boolean.message

While I understand the reason, I do not understand the given location: where does ".boolean" come from?

@amark
Copy link
Owner

amark commented May 21, 2023

@rozek you're correct, not sure why that happened :( its roughly ~L1040 which uses the chain.back function to loop up the chain which is rouglhy at ~L558. Probably would take me a while to debug myself honestly, and this is low priority, but would love if people gave it a stab! Maybe with like what you have here added as a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants