Skip to content

Commit 88eae89

Browse files
dannysmithclaude
andcommitted
Handle promise rejection in Linux UI font detection
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent f96c478 commit 88eae89

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/components/layout/Layout.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,18 @@ export const Layout: React.FC = () => {
187187
return
188188
}
189189

190-
void commands.getLinuxUiFont().then(result => {
191-
if (cancelled) return
192-
if (result.status === 'ok' && result.data) {
193-
window.document.documentElement.style.setProperty(
194-
'--font-ui',
195-
`'${result.data}', -apple-system, 'Segoe UI', 'Ubuntu', 'Cantarell', 'Noto Sans', 'DejaVu Sans', sans-serif`
196-
)
197-
}
198-
})
190+
void commands
191+
.getLinuxUiFont()
192+
.then(result => {
193+
if (cancelled) return
194+
if (result.status === 'ok' && result.data) {
195+
window.document.documentElement.style.setProperty(
196+
'--font-ui',
197+
`'${result.data}', -apple-system, 'Segoe UI', 'Ubuntu', 'Cantarell', 'Noto Sans', 'DejaVu Sans', sans-serif`
198+
)
199+
}
200+
})
201+
.catch(() => {})
199202

200203
return () => {
201204
cancelled = true

0 commit comments

Comments
 (0)