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

refactor: Replace _.isNil(value) with value == null #7809

Merged
merged 1 commit into from Jun 3, 2020

Conversation

wingkwong
Copy link
Contributor

Addresses: #7747

@codecov-commenter
Copy link

Codecov Report

Merging #7809 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7809   +/-   ##
=======================================
  Coverage   88.18%   88.18%           
=======================================
  Files         245      245           
  Lines        9305     9305           
=======================================
  Hits         8206     8206           
  Misses       1099     1099           
Impacted Files Coverage Δ
...s/package/compile/events/apiGateway/lib/apiKeys.js 94.73% <100.00%> (ø)
lib/plugins/aws/provider/awsProvider.js 92.72% <100.00%> (ø)
lib/plugins/plugin/install/install.js 98.61% <100.00%> (ø)

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 22a4ed2...469c335. Read the comment docs.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Thank you @wingkwong !

@medikoo medikoo merged commit 6cf4901 into serverless:master Jun 3, 2020
@exoego exoego mentioned this pull request Jun 3, 2020
54 tasks
@sashock
Copy link

sashock commented Jun 2, 2021

technically the substitution is not equivalent,
you should have also checked against undefined
see the documentation of isNil https://lodash.com/docs/4.17.15#isNil

@medikoo
Copy link
Contributor

medikoo commented Jun 2, 2021

technically the substitution is not equivalent,

@Sashok Actually it is. value == null is equivalent to value === null || value === undefined

@sashock
Copy link

sashock commented Jun 2, 2021

You're right, I realized it after having posted :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants