fix: array to string result in comma

This commit is contained in:
Methapon2001 2023-12-12 12:40:09 +07:00
parent ff712358cf
commit 80f1ead5d0
No known key found for this signature in database
GPG key ID: 849924FEF46BD132

View file

@ -63,7 +63,9 @@ function constructUrl(path: string | string[], append = true) {
}
function consistantPath(path: string | string[]) {
return path.toString().split('/').filter(Boolean).join('/') + '/'
return Array.isArray(path)
? path.join('/') + '/'
: path.split('/').filter(Boolean).join('/') + '/'
}
const useStorage = defineStore('storageStore', () => {
@ -116,6 +118,7 @@ const useStorage = defineStore('storageStore', () => {
}
})
console.log(structure, folder.value, file.value)
return structure
})
const currentInfo = reactive<{