ctrlplusb / react-component-queries

Provide props to your React Components based on their Width and/or Height.
MIT License
183 stars 12 forks source link

fix mergeWith to keep 'falsy' properties from right side #89

Closed hoschi closed 7 years ago

hoschi commented 7 years ago

Current code remove properties which are "falsy" like 0.

codecov[bot] commented 7 years ago

Codecov Report

Merging #89 into master will decrease coverage by 0.02%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
- Coverage   98.41%   98.38%   -0.03%     
==========================================
  Files           5        5              
  Lines          63       62       -1     
  Branches       17       16       -1     
==========================================
- Hits           62       61       -1     
  Partials        1        1
Impacted Files Coverage Δ
src/utils/mergeWith.js 100% <ø> (ø) :arrow_up:

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 f36630f...341b65e. Read the comment docs.

pirelenito commented 7 years ago

We just faced the same problem in our project.

What was the original reason for removing props? It seems way too intrusive for a HOC to do that. Could we just get rid of that?

Btw, react-component-queries is awesome! @ctrlplusb ❤️

ctrlplusb commented 7 years ago

Apologies about this. Defo a bug.

Appreciate the PR, I'll look to merge this week if review is good.

pirelenito commented 7 years ago

Hi @ctrlplusb, did you had a chance to take a look at this? The failure in codecov is pretty weird... I couldn't understand where the coverage was reduced.

ctrlplusb commented 7 years ago

Apologies for the tardiness in getting to this. All great. Thank you so much for the help!

hoschi commented 7 years ago

@ctrlplusb thanks for looking into my stuff :+1: