admin/fs: avoid crash on malformed permissions
Massimo Melina committed
Mar 16, 2025 at 09:31 UTC
a525a8128e8de69cd1e617da52f11ec3fac011ca
1 file changed
+1
-1
admin/src/FileForm.ts
+1
-1
@@ -283,7 +283,7 @@ function WhoField({ value, onChange, parent, inherit, accounts, helperText, othe
283
onChange,
284
options: accounts?.map(a => ({ value: a.username, label: a.username, a })) || [],
285
// show icon only for groups, to save space inside the field (not the list)
286
- renderOption: (x: any) => h('span', {}, x.a.isGroup && account2icon(x.a), ' ', x.label),
286
+ renderOption: (x: any) => h('span', {}, x.a?.isGroup && account2icon(x.a), ' ', x.label),
287
}) ),
288
h(FormHelperText, {},
289
helperText,