apollo-link-state
apollo-link-state copied to clipboard
Fix: when alias returns a falsy value, it may return undefined
Hi! I had an aliased field vanishing from the local state, which after some investigation seem to have been solved by splitting up the return statement as shown in this PR.
@jimmycallin: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/
Codecov Report
Merging #303 into master will increase coverage by
0.12%. The diff coverage is100%.
@@ Coverage Diff @@
## master #303 +/- ##
==========================================
+ Coverage 95% 95.12% +0.12%
==========================================
Files 2 2
Lines 80 82 +2
Branches 26 26
==========================================
+ Hits 76 78 +2
Misses 1 1
Partials 3 3
| Impacted Files | Coverage Δ | |
|---|---|---|
| packages/apollo-link-state/src/index.ts | 93.84% <100%> (+0.19%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 0f5930a...85102fb. Read the comment docs.