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

Calculation rule "default on error" doesn't work for list-valued properties #12

Open
mattheyan opened this issue Jan 23, 2020 · 0 comments

Comments

@mattheyan
Copy link
Contributor

If a calculation throws an error, the defaultIfError option is used as the property value instead, which has a default value of null. This isn't a valid value for list-valued properties, and it results in an error: "Cannot read property 'length' of null".

Should we...

  • Use the property default instead?
  • Use a data-type default?
  • Use [] for list-valued properties, and null for others?

On a related note, it might be good for canSetValue to return false if you try to set a list-valued property to null (since that will also result in cryptic unhandled errors for the same reason).

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