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

fix search bar bug #50118

Merged
merged 1 commit into from Apr 24, 2018
Merged

fix search bar bug #50118

merged 1 commit into from Apr 24, 2018

Conversation

GuillaumeGomez
Copy link
Member


if (e) {
e.preventDefault();
}

if (!query.query || query.id === currentResults) {
if (query.query.length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Will this bite us if this block is entered from !query.query? Can query.query be undefined here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Based on this code, I'd say no. This is why I'm complaining about such conditions: it's difficult to understand what we're checking. I think the "real" condition here is if (query.query.length === 0 || query.id === currentResults) {.

@pietroalbini pietroalbini added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 20, 2018
@QuietMisdreavus
Copy link
Member

Makes sense. Thanks for the clarification!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 21, 2018

📌 Commit 01c97ea has been approved by QuietMisdreavus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 21, 2018
@bors
Copy link
Contributor

bors commented Apr 22, 2018

☔ The latest upstream changes (presumably #49757) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 22, 2018
@bors
Copy link
Contributor

bors commented Apr 22, 2018

🔒 Merge conflict

@GuillaumeGomez
Copy link
Member Author

Fixed merge conflict.

@bors r=QuietMisdreavus

@bors
Copy link
Contributor

bors commented Apr 23, 2018

📌 Commit f33af5c has been approved by QuietMisdreavus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 23, 2018
@GuillaumeGomez
Copy link
Member Author

@bors: rollup

kennytm added a commit to kennytm/rust that referenced this pull request Apr 24, 2018
bors added a commit that referenced this pull request Apr 24, 2018
Rollup of 11 pull requests

Successful merges:

 - #49461 (std: Child::kill() returns error if process has already exited)
 - #49727 (Add Cell::update)
 - #49812 (Fix revision support for UI tests.)
 - #49829 (Add doc links to `std::os` extension traits)
 - #49906 (Stabilize `std::hint::unreachable_unchecked`.)
 - #49970 (Deprecate Read::chars and char::decode_utf8)
 - #49985 (don't see issue #0)
 - #50118 (fix search bar bug)
 - #50139 (encourage descriptive issue titles)
 - #50174 (Use FxHashMap in syntax_pos::symbol::Interner::intern.)
 - #50185 (core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN`)

Failed merges:
@bors bors merged commit f33af5c into rust-lang:master Apr 24, 2018
@GuillaumeGomez GuillaumeGomez deleted the search-bar-bug branch April 24, 2018 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants