We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given this code
let objectToWrap = { objectProperty: { foo: 'bar', }, }; let changeset = Changeset(objectToWrap); let keys = Object.keys(changeset.objectProperty);
I would expect keys to be ['foo'] but it returns an empty array.
keys
['foo']
I believe the issue lies here: https://github.com/validated-changeset/validated-changeset/blob/c1c95b729aae80fd30b30b691202a94c974a3309/src/utils/object-tree-node.ts#L56
It always returns ownKeys from node.changes even if no changes have been made.
ownKeys
node.changes
I have created a repro here, but it's just the code above https://github.com/elgordino/validated-changeset-repro
I've raised a PR with tests. Not sure if the overall approach is the best way forward, but it works :)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given this code
I would expect
keys
to be['foo']
but it returns an empty array.I believe the issue lies here: https://github.com/validated-changeset/validated-changeset/blob/c1c95b729aae80fd30b30b691202a94c974a3309/src/utils/object-tree-node.ts#L56
It always returns
ownKeys
fromnode.changes
even if no changes have been made.I have created a repro here, but it's just the code above https://github.com/elgordino/validated-changeset-repro
I've raised a PR with tests. Not sure if the overall approach is the best way forward, but it works :)
The text was updated successfully, but these errors were encountered: