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

getSerializedNodes - number as node property type #196

Open
joaquinvietto opened this issue Feb 18, 2021 · 0 comments
Open

getSerializedNodes - number as node property type #196

joaquinvietto opened this issue Feb 18, 2021 · 0 comments

Comments

@joaquinvietto
Copy link

Describe the bug
When a node has a property of type integer which value is zero, then the property is not included in node.props by getSerializedNodes function.

To Reproduce
Steps to reproduce the behavior:

  1. Imagine a node called myNode which has a property called myProp that stores a number.
  2. Set te value of myProp as zero, like: setProp((p) => { p[myProp] = 0; })
  3. Execute getSerializedNodes()
  4. Check the properties of myNode in the result of getSerializedNodes.
  5. The property myProp is not included.

Expected behavior
In the result of getSerializedNodes, the node myNode should include a prop called myProp which value is zero.

Your environment

Software Version(s)
craft.js 0.1.0-beta.11
React 17.0.1
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

1 participant