From 80f1ead5d061362dbac09d27b6eb64b732f010fa Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:40:09 +0700 Subject: [PATCH] fix: array to string result in comma --- Services/client/src/stores/storage.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Services/client/src/stores/storage.ts b/Services/client/src/stores/storage.ts index 6d05c9f..ee6d2b8 100644 --- a/Services/client/src/stores/storage.ts +++ b/Services/client/src/stores/storage.ts @@ -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<{