-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
packages/emotion/src/index.js
Outdated
@@ -120,6 +120,7 @@ function handleInterpolation( | |||
if ( | |||
interpolation === undefined || | |||
interpolation === null || | |||
interpolation === false || | |||
typeof value === 'boolean' |
There was a problem hiding this comment.
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'
.
There was a problem hiding this comment.
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.
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: