summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Milanesio <luca.milanesio@gmail.com>2020-11-12 00:56:18 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-11-12 00:56:18 +0000
commitbeb53bcacfb234b6909d72fc0a083b35c9ba3734 (patch)
treef2a1b3d4431f2073eff42a8ecc67e4bcdce75362
parent00a62ba7fb668bbc3a23575eb1b6e0fcf3af43ee (diff)
parent44fdd809847e930232ffd67d39faea440d845a92 (diff)
Merge "Fix label votes not showing up when not logged in" into stable-3.3
-rw-r--r--polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.ts b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.ts
index 626e918dfd..1dac371f82 100644
--- a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.ts
+++ b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.ts
@@ -97,9 +97,9 @@ export class GrLabelInfo extends GestureEventListeners(
* This method also listens on change.labels.*,
* to trigger computation when a label is removed from the change.
*/
- _mapLabelInfo(labelInfo: LabelInfo, account: AccountInfo) {
+ _mapLabelInfo(labelInfo?: LabelInfo, account?: AccountInfo) {
const result: FormattedLabel[] = [];
- if (!labelInfo || !account) {
+ if (!labelInfo) {
return result;
}
if (!isDetailedLabelInfo(labelInfo)) {
@@ -152,7 +152,7 @@ export class GrLabelInfo extends GestureEventListeners(
className: labelClassName,
account: label,
};
- if (label._account_id === account._account_id) {
+ if (label._account_id === account?._account_id) {
// Put self-votes at the top.
result.unshift(formattedLabel);
} else {