Skip to content

Commit d75b31a

Browse files
committed
fix custom single devices grid rendering
1 parent a854a64 commit d75b31a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

client/src/probability-lab/ui/device-view.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ function abbreviateOutcome(outcome) {
1111
if (!outcome || typeof outcome !== 'string') return '';
1212
const trimmed = outcome.trim();
1313
if (!trimmed) return '';
14-
14+
1515
const words = trimmed.split(/\s+/).filter(word => word.length > 0);
1616
if (words.length === 0) return '';
17-
17+
1818
if (words.length === 1) {
1919
// Single word: return first letter capitalized
2020
return words[0][0].toUpperCase();
2121
}
22-
22+
2323
// Multiple words: return first letter of each word capitalized
2424
return words.map(word => word[0].toUpperCase()).join('');
2525
}
@@ -55,7 +55,7 @@ function renderCustomDevice(target, def, index, { compact = false } = {}) {
5555
item.className = 'pl-custom-outcome body-xsmall';
5656
if (i === index) item.classList.add('pl-custom-outcome--selected');
5757
// Use abbreviated labels in compact mode (two-device mode)
58-
item.textContent = compact ? abbreviateOutcome(def.labels[i]) : def.labels[i];
58+
item.textContent = abbreviateOutcome(def.labels[i]);
5959
grid.append(item);
6060
}
6161

0 commit comments

Comments
 (0)