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

Remove bad sort #1276

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Remove bad sort #1276

merged 3 commits into from
Sep 8, 2023

Conversation

nguyentvan7
Copy link
Collaborator

Fixes bad sorts like this:
image
Code was originally there for hydro traveler conditional, since the values were [0.5, 1, 1.5, etc], it was incorrectly sorted for some reason without that call. But we changed the conditional format to not use that, so this change was never needed, and is just a bug now.

@nguyentvan7 nguyentvan7 requested a review from frzyc August 28, 2023 14:21
@github-actions
Copy link
Contributor

github-actions bot commented Aug 28, 2023

[Fri Sep 8 23:04:52 UTC 2023] - Deleted deployment

frzyc
frzyc previously approved these changes Aug 28, 2023
Copy link
Owner

@frzyc frzyc left a comment

Choose a reason for hiding this comment

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

A bit of a nitpick for cornercases (Which might not exist)
Objects do not guarantee order. In most cases, they are by insert over, however, if the keys are "number-like" they are sorted ascendingly.
Perhaps if we need to guarantee order, a Map should be used here.
Could be a consideration for Pando Conditionals.

@nguyentvan7
Copy link
Collaborator Author

Yea that exact cornercase was happening with hydro traveler conditionals with states 0.5, 1, 1.5, etc. Forgot what the order was, but it was not what was expected

@nguyentvan7 nguyentvan7 merged commit 941798f into master Sep 8, 2023
4 checks passed
@nguyentvan7 nguyentvan7 deleted the van/fixCondOrder branch September 8, 2023 23: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.

None yet

2 participants