Fix mention chip
If the account information has an email address only, then fill it with
account details. Only check for account_id equality, if we actually have
an id before filling the details.
Release-Notes: skip
Google-Bug-Id: b/349884401
Change-Id: I8c682c0aa709a61b6f82d1b3763b2c99bb087ac5
(cherry picked from commit a6e93ec5a535743fcc52785b15252c7f517ec3d0)
diff --git a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.ts b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.ts
index 1db484c..6edf0fc53 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.ts
+++ b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.ts
@@ -205,7 +205,8 @@
if (
account &&
account !== this.account &&
- account._account_id === this.account._account_id
+ (!this.account._account_id ||
+ account._account_id === this.account._account_id)
) {
this.account = {...account, ...this.account};
}