Skip to content

Conversation

@sdemjanenko
Copy link
Contributor

Running === against a newly instantiated array will always return
false. Instead, we should check that allRoutes is empty.

Running `===` against a newly instantiated array will always return
false. Instead, we should check that `allRoutes` is empty.
@sdemjanenko sdemjanenko requested a review from kamilogorek as a code owner July 6, 2021 19:52
@AbhiPrasad AbhiPrasad self-requested a review July 6, 2021 20:15
Copy link
Contributor

@kamilogorek kamilogorek left a comment

Choose a reason for hiding this comment

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

LGTM code wise cc @AbhiPrasad for logic check.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

We should write an eslint rule to guard against this

@AbhiPrasad AbhiPrasad merged commit f398340 into getsentry:master Jul 7, 2021
@AbhiPrasad AbhiPrasad changed the title fix: allRoutes cannot triple equal a new array instance fix(react): allRoutes cannot triple equal a new array instance Jul 7, 2021
@sdemjanenko sdemjanenko deleted the fix_all_routes_equality_check branch July 7, 2021 18:04
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.

3 participants