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

Do not break if mouse moves to x=0 when using rangeslider #6780

Merged
merged 3 commits into from Nov 14, 2023

Conversation

david-bezero
Copy link
Contributor

@david-bezero david-bezero commented Nov 9, 2023

This fixes a small issue: "Cannot read properties of undefined (reading '0')" if the user moves their mouse to x=0 when dragging the rangeslider. I searched through the rest of the code and this seems to be the only place with the issue.

draftlogs/6780_fix.md Outdated Show resolved Hide resolved
@archmoj
Copy link
Contributor

archmoj commented Nov 10, 2023

LGTM.

Copy link
Contributor

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Great find and fix @david-bezero!

FWIW we haven’t used it yet since we were stuck in ES5 until recently, but we could do this with the nullish coalescing operator

@david-bezero
Copy link
Contributor Author

I considered the nullish coalescing operator and searched through the code to see if you were using it, but found no occurrences so assumed it wasn't something that can be used in this codebase. Good to know it's now something you're happy to use though.

@archmoj archmoj merged commit 5231272 into plotly:master Nov 14, 2023
1 check passed
@david-bezero david-bezero deleted the range-0 branch November 14, 2023 09:42
Farkites added a commit that referenced this pull request Feb 2, 2024
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