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

fix: Fix bug when the input to a reducer list is undefined #354

Conversation

raingerber
Copy link
Contributor

What (Bugfix): Reducer lists currently skip the first reducer when the initial value is undefined

Why: #353

How: Use null as a fallback when the initial value for Promise.map is undefined

Checklist:

  • Documentation N/A
  • Tests
  • Ready to be merged
  • Added username to all-contributors list

@raingerber raingerber requested a review from acatl July 30, 2019 00:01
@codecov
Copy link

codecov bot commented Jul 30, 2019

Codecov Report

Merging #354 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #354   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files         139    139           
  Lines        1981   1982    +1     
  Branches      181    182    +1     
=====================================
+ Hits         1981   1982    +1
Impacted Files Coverage Δ
...ta-point/lib/reducer-types/reducer-list/resolve.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12f2d2d...1ed86e0. Read the comment docs.

Copy link
Collaborator

@acatl acatl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@@ -153,3 +153,42 @@ describe('resolve#reducer.resolve - reducer request', () => {
})
})
})

describe('resolve#reducer.resolve - with falsy input', () => {
const testFalsyInput = async (inputValue, expectedValue) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async!!

@raingerber raingerber merged commit 82c3b95 into ViacomInc:master Jul 30, 2019
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

Successfully merging this pull request may close these issues.

2 participants