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 eslint warnings for valid-typeof #5889

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

tsmock
Copy link
Contributor

@tsmock tsmock commented Jun 7, 2023

We were comparing to undefined (literal) instead of 'undefined' (string). typeof will always return a string, so 'undefined' !== undefined would always return true.

For more details, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof .

We were comparing to undefined (literal) instead of 'undefined'
(string). `typeof` will always return a string, so
`'undefined' !== undefined` would always return `true`.

Signed-off-by: Taylor Smock <tsmock@meta.com>
Copy link
Contributor

@HelNershingThapa HelNershingThapa left a comment

Choose a reason for hiding this comment

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

I have left some comments that may appear unrelated to the pull request. My intention was to seek clarity and confirm my understanding of certain aspects.

frontend/src/components/teamsAndOrgs/teams.js Outdated Show resolved Hide resolved
frontend/src/components/editor.js Show resolved Hide resolved
The useSelector calls for `organisations` and `pmTeams` have been removed as they are not utilized in this component. The ready condition now checks only for the existence of `team.teamId` as a `number`."
@sonarcloud
Copy link

sonarcloud bot commented Jun 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.2% 0.2% Duplication

@HelNershingThapa HelNershingThapa merged commit d1e1c9f into hotosm:develop Jun 22, 2023
3 checks passed
@tsmock tsmock deleted the chore/eslint-valid-typeof branch June 22, 2023 11:32
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

3 participants