fix: admin/monitoring: agent "undefined" displayed
Massimo Melina committed
Feb 24, 2024 at 15:16 UTC
634cef1a4143041a55914a158890f034c9471ea5
1 file changed
+3
-3
admin/src/LogsPage.ts
+3
-3
@@ -215,8 +215,7 @@ function LogFile({ file, addToFooter, hidden }: { hidden?: boolean, file: string
215
width: 60,
216
hidden: !showAgent,
217
valueGetter: ({ row }) => row.extra?.ua,
218
- renderCell: ({ value }) =>
219
- value && agentIcons(value),
218
+ renderCell: ({ value }) => agentIcons(value),
219
},
220
{
221
field: 'notes',
@@ -263,7 +262,8 @@ function LogFile({ file, addToFooter, hidden }: { hidden?: boolean, file: string
262
}
263
}
264
266
-export function agentIcons(agent: string) {
265
+export function agentIcons(agent: string | undefined) {
266
+ if (!agent) return
267
const UW = 'https://upload.wikimedia.org/wikipedia/commons/'
268
const short = shortenAgent(agent)
269
const browserIcon = icon(short, {