fix: admin/fs: in some cases permission-field could be empty
Massimo Melina committed
Jan 16, 2023 at 10:50 UTC
4a537542bb464af6ea2672fc454a480152f4a0d0
1 file changed
+2
-2
admin/src/FileForm.ts
+2
-2
@@ -110,9 +110,9 @@ function WhoField({ value, onChange, parent, inherit, accounts, helperText, ...r
110
{ value: false },
111
{ value: '*' },
112
{ value: [], label: "Select accounts" },
113
- ].map(x => x && x.value !== inherit // don't offer inherited value twice
113
+ ].map(x => (x.value === value || x.value !== inherit) // don't offer inherited value twice, unless it was already selected
114
&& { label: _.capitalize(who2desc(x.value)), ...x })), // default label
115
- [inherit, parent])
115
+ [inherit, parent, value])
116
117
const arrayMode = Array.isArray(value)
118
return h('div', {},