-
Notifications
You must be signed in to change notification settings - Fork 447
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
number 0 becomes empty atom #460
Comments
I believe the fix for this is to change this line: https://github.com/Netflix/falcor-router/blob/master/src/cache/optimizePathSets.js#L34 To be:
So that we don't inadvertently pick it up as a missing path, and insert the empty atom. I believe that Fixes the issue in my local testing, just figuring out what I need to do to test it more broadly (unit tests, integration tests etc.), and will issue a pull request. |
Paths which returned falsey values (null, 0, false, '') were being treated as missing paths, and hence being returned as empty atoms. See: Netflix/falcor#460 Added unit tests, and get integration test for these falsey value cases.
Closing this. It's fixed/merged. Forgot to include the issue reference in the commit/PR |
if i
return [{ path: ['test', 1, 'nr'], value: 0 }]
from a routers get method the jsonGraph returned has nr as { $type: "atom" } no value.The text was updated successfully, but these errors were encountered: