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

Handle boolean values #360

Merged
merged 4 commits into from
Sep 30, 2017
Merged

Handle boolean values #360

merged 4 commits into from
Sep 30, 2017

Conversation

tkh44
Copy link
Member

@tkh44 tkh44 commented Sep 30, 2017

What:
Literal false values were tripping up the parser.

Why:
We were checking undefined and null but not false.

How:
Add explicit false check.

Checklist:

  • Documentation
  • Tests
  • Code complete

@codecov
Copy link

codecov bot commented Sep 30, 2017

Codecov Report

Merging #360 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #360   +/-   ##
=======================================
  Coverage   97.73%   97.73%           
=======================================
  Files          22       22           
  Lines         662      662           
  Branches      152      152           
=======================================
  Hits          647      647           
  Misses         11       11           
  Partials        4        4
Impacted Files Coverage Δ
packages/emotion/src/index.js 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 5e82256...2272cd9. Read the comment docs.

@@ -120,6 +120,7 @@ function handleInterpolation(
if (
interpolation === undefined ||
interpolation === null ||
interpolation === false ||
typeof value === 'boolean'
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be typeof interpolation === 'boolean'.

Copy link
Member

Choose a reason for hiding this comment

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

@tkh44 The typeof value === 'boolean' can also be removed, I must've wrote value instead of interpolation by mistake.

@tkh44 tkh44 assigned tkh44 and unassigned tkh44 Sep 30, 2017
@emmatown emmatown changed the title Handle literal false values Handle boolean values Sep 30, 2017
@emmatown emmatown merged commit 8234cbd into master Sep 30, 2017
@emmatown emmatown deleted the handle-literal-false-values branch September 30, 2017 03:37
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