Skip to content

Commit 6d2fd47

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Fix regression in Live Metrics device dropdown labels
Fixed: 382393142 Change-Id: Ic0ed364dee96c9074f82af40413ea8f076ed80d0 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6072286 Commit-Queue: Connor Clark <[email protected]> Commit-Queue: Adam Raine <[email protected]> Reviewed-by: Adam Raine <[email protected]> Auto-Submit: Connor Clark <[email protected]>
1 parent 6e220c0 commit 6d2fd47

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

front_end/panels/timeline/components/LiveMetricsView.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,9 +690,14 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
690690
}
691691

692692
#getLabelForDeviceOption(deviceOption: DeviceOption): string {
693-
const deviceScope = this.#cruxManager.getSelectedDeviceScope();
694-
const deviceScopeLabel = this.#getDeviceScopeDisplayName(deviceScope);
695-
const baseLabel = deviceOption === 'AUTO' ? i18nString(UIStrings.auto, {PH1: deviceScopeLabel}) : deviceScopeLabel;
693+
let baseLabel;
694+
if (deviceOption === 'AUTO') {
695+
const deviceScope = this.#cruxManager.getSelectedDeviceScope();
696+
const deviceScopeLabel = this.#getDeviceScopeDisplayName(deviceScope);
697+
baseLabel = i18nString(UIStrings.auto, {PH1: deviceScopeLabel});
698+
} else {
699+
baseLabel = this.#getDeviceScopeDisplayName(deviceOption);
700+
}
696701

697702
if (!this.#cruxManager.pageResult) {
698703
return i18nString(UIStrings.loadingOption, {PH1: baseLabel});

0 commit comments

Comments
 (0)