Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 crash during deck filtering #11880
Fix crash during deck filtering #11880
Changes from 12 commits
40854dc
5b617b0
50ffbd9
78fae50
35fcf12
d857b97
d711596
57414bf
6001089
89fd75f
4072a97
d63d583
0192051
994b8f1
300a907
3eb7552
62d7786
cf20b6f
a29d65c
158f59d
3534a9d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an explicit call to
if results == null
would be better. Try are more costly than conditional in general, and anyway clearer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've since reverted this code since David said it was better to have it crash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to use a nullable to avoid an if check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer a crash here (AKA no change), as it's an assertion which doesn't hold, but I'll leave the final decision to you. Implementer's choice, I'm happy either way =)
I think the answer to the question of 'what do we do if we get a null' is hard to pin down: do we want all results, or no results?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that's a good question. I did no results since that was simpler to implement but it's not necessarily the best UX choice. It would require a sizeable refactor though to return all results.
I think since we're getting a little outside the scope of the PR I'll revert it to original for now and leave it for a non-urgent issue.