fix: admin/fs: system-integration wasn't working if you click continue with empty field

Massimo Melina committed Apr 12, 2024 at 11:01 UTC 3cf9600e95b2a81ee5701fc567efd74ff523abe1
2 files changed +2 -2
admin/src/VfsMenuBar.ts
+1 -1
@@ -59,7 +59,7 @@ export default function VfsMenuBar({ statusApi }: { statusApi: ApiObject }) {
59 field: { comp: VfsPathField, label: "Add to this folder", placeholder: "home" },
60 form: { saveOnEnter: false }
61 })
62 - return !parent ? false : apiCall('windows_integration', { parent }).then(reload)
62 + return typeof parent === 'string' && apiCall('windows_integration', { parent }).then(reload)
63 }
64 } : {
65 confirm: true,
admin/src/dialog.ts
+1 -1
@@ -177,7 +177,7 @@ export async function formDialog<T>(
177
178 }
179
180 -export async function promptDialog(msg: ReactNode, { value, field, save, addToBar=[], ...props }:any={}) : Promise<string | undefined> {
180 +export async function promptDialog(msg: ReactNode, { value='', field, save, addToBar=[], ...props }:any={}) : Promise<string | undefined> {
181 return formDialog<{ text: string }>({
182 ...props,
183 values: { text: value },