Skip to content

Fix incorrect edge detection logic.#31

Merged
izaakschroeder merged 1 commit intomasterfrom
fix-incorrect-edge-detection
May 23, 2017
Merged

Fix incorrect edge detection logic.#31
izaakschroeder merged 1 commit intomasterfrom
fix-incorrect-edge-detection

Conversation

@izaakschroeder
Copy link
Copy Markdown
Contributor

It looks like previously .indexOf !== region should have been .indexOf(region) !== -1. Since incorrect edge flipping to the point of UI breakage doesn't happen that often this went undetected for quite some time. So the logic is now fixed to do the right thing and does so in a way a little more performant than calling indexOf on a two-element constant array.

@izaakschroeder izaakschroeder requested a review from qiushihe May 23, 2017 01:57
@izaakschroeder izaakschroeder force-pushed the fix-incorrect-edge-detection branch from c9137b2 to 1d3d536 Compare May 23, 2017 02:20
Copy link
Copy Markdown
Collaborator

@qiushihe qiushihe left a comment

Choose a reason for hiding this comment

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

LGTM

It looks like previously `.indexOf !== region` should have been `.indexOf(region) !== -1`. Since incorrect edge flipping to the point of UI breakage doesn't happen that often this went undetected for quite some time. So the logic is now fixed to do the right thing and does so in a way a little more performant than calling `indexOf` on a two-element constant array.
@izaakschroeder izaakschroeder force-pushed the fix-incorrect-edge-detection branch from 1d3d536 to de2b8ee Compare May 23, 2017 02:43
@izaakschroeder izaakschroeder merged commit 888937c into master May 23, 2017
@izaakschroeder izaakschroeder deleted the fix-incorrect-edge-detection branch May 23, 2017 02:48
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