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 #7141 - Wrong conversion of to a boolean value #7161

Merged
merged 3 commits into from Aug 13, 2020

Conversation

agigleux
Copy link
Contributor

I replace all occurrences of:

const hasError = error && error !== null;

by

const hasError = Boolean(error);

yarn test:unit: OK
yarn test:front: OK

Signed-off-by: agigleux <alexandre.gigleux@sonarsource.com>
Copy link
Contributor

@soupette soupette left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@HichamELBSI HichamELBSI left a comment

Choose a reason for hiding this comment

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

LGTM

@alexandrebodin alexandrebodin added this to the 3.1.4 milestone Aug 12, 2020
@alexandrebodin alexandrebodin added source: core:admin Source is core/admin package issue: bug Issue reporting a bug labels Aug 12, 2020
@codecov
Copy link

codecov bot commented Aug 12, 2020

Codecov Report

Merging #7161 into master will decrease coverage by 0.00%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7161      +/-   ##
==========================================
- Coverage   26.23%   26.22%   -0.01%     
==========================================
  Files        1131     1131              
  Lines       15431    15433       +2     
  Branches     2442     2438       -4     
==========================================
  Hits         4048     4048              
- Misses       9564     9569       +5     
+ Partials     1819     1816       -3     
Flag Coverage Δ
#front 18.26% <14.28%> (-0.01%) ⬇️
#unit 53.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../admin/src/components/InputJSONWithErrors/index.js 0.00% <0.00%> (ø)
...ent-manager/admin/src/components/InputUID/index.js 0.00% <0.00%> (ø)
...-manager/admin/src/components/Wysiwyg/constants.js 0.00% <ø> (ø)
...nt-manager/admin/src/components/Wysiwyg/helpers.js 0.00% <0.00%> (ø)
...tent-manager/admin/src/components/Wysiwyg/index.js 0.00% <0.00%> (ø)
...er/admin/src/components/WysiwygWithErrors/index.js 0.00% <0.00%> (ø)
...iners/HomePage/HomePageContent/HomePageSettings.js 0.00% <ø> (ø)
...rapi-plugin-upload/admin/src/translations/index.js 0.00% <ø> (ø)
...dmin/admin/src/components/Webhooks/Inputs/index.js 54.54% <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 6f37e75...39087d7. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug source: core:admin Source is core/admin package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants