add default value for filename

This commit is contained in:
Judicael 2022-08-29 18:10:37 +03:00
parent facd5fe4c7
commit bd2fbe08c1

View file

@ -48,7 +48,7 @@ export async function saveToFileSystem(
const hasPermissions = await checkPermissions(fileHandle) const hasPermissions = await checkPermissions(fileHandle)
if (!hasPermissions) return null if (!hasPermissions) return null
} }
let filename = '' let filename = `${file.name}`
if (!supported) { if (!supported) {
filename = prompt('Enter the desired file name!') ?? `${file.name}` filename = prompt('Enter the desired file name!') ?? `${file.name}`
} }