fix: admin/fs: save button not working on home item

Massimo Melina committed Mar 14, 2022 at 23:48 UTC 961ba79e8b8fae544b004379a6912c1782118669
1 file changed +1 -1
admin/src/FileCard.ts
+1 -1
@@ -65,7 +65,7 @@ function FileForm({ file }: { file: ReturnType<typeof useSnapState>['selectedFil
65 save: {
66 disabled: isEqualLax(values, file),
67 async onClick() {
68 - if (!values.name)
68 + if (file.id !== '/' && !values.name)
69 return alertDialog(`Name cannot be empty`, 'warning')
70 const props = _.pickBy(values, (v,k) =>
71 v !== file[k as keyof typeof values])