commit | d2db74074012cb91974d695312fd3c9a433b7243 | [log] [tgz] |
---|---|---|
author | Kamil Musin <kamilm@google.com> | Wed Feb 15 12:28:37 2023 +0100 |
committer | Kamil Musin <kamilm@google.com> | Wed Feb 15 12:28:37 2023 +0100 |
tree | 0ac6a6dfd249202370e121527b9958d2e1a6a5a9 | |
parent | 109fc63df0971485a85d9b6b513ef9fb444d81ad [diff] |
Fix the bug with wrong outdated suggestions validation. The bug was introduced during lit migration: https://gerrit-review.git.corp.google.com/c/gerrit/+/334686 The line currently is always evaluates to false instead of comparing text at time of the request to the current one. Release-Notes: skip Change-Id: I7625f6bf33046d09b0938c04cd08c631b274b0f7
diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.ts b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.ts index ab74e8b..f8f7f9d 100644 --- a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.ts +++ b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.ts
@@ -435,10 +435,11 @@ return; } + const requestText = this.text; const update = () => { query(this.text) .then(suggestions => { - if (this.text !== this.text) { + if (requestText !== this.text) { // Late response. return; }