fix: admin/shared: removing the last item from the root was not effective
Massimo Melina committed
Mar 10, 2026 at 15:53 UTC
5d34b5ec3ab9599111c716ee8d0a0324b43879c4
2 files changed
+1
-3
admin/src/FileForm.ts
+1
-1
@@ -183,7 +183,7 @@ export default function FileForm({ file, addToBar, statusApi, accounts, saved, i
183
comp: SelectField, // uniqBy to avoid same icon (with different names), but it works only on array, so first step is to convert the object
184
options: _.map(_.uniqBy(_.map(SYS_ICONS, (v,k) => [k, v[0], v[1] ?? k] as const), x => x[2]), ([k, emoji]) =>
185
({ value: k, label: h(Flex, { gap: '.5em' }, hIcon(k), hIcon(emoji), ' ', k) }) ), // show both font-icon and emoji versions
186
- helperText: "Second icon you see is the fallback"
186
+ helperText: "The second icon is the fallback"
187
} : {
188
label: "Icon file", placeholder: "default", comp: FileField, fileMask: IMAGE_FILEMASK,
189
}
admin/src/VfsPage.ts
-2
@@ -233,8 +233,6 @@ export function deleteVfs(uris: string[]) {
233
const node = id2vfsNode.get(uri)!
234
const siblings = node.parent!.children!
235
_.remove(siblings, { id: node.id })
236
- if (!siblings.length)
237
- node.parent!.children = undefined
236
}
237
if (state.movingFile && topLevelUris.some(uri => state.movingFile === uri || isDescendantUri(state.movingFile, uri)))
238
state.movingFile = ''