fix: getDirectory didn't check metadata changes

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2021-10-31 01:46:05 +02:00
parent 48b84f9ffd
commit 581cd2b306

View File

@ -37,13 +37,13 @@ export const mutations: MutationTree<FileState> = {
const fileIndex = path?.findIndex((element: FileStateFile) => element.filename === filename)
if (path && fileIndex !== -1) {
// eslint-disable-next-line
const currentFile = path[fileIndex] as any
const currentFile = {...path[fileIndex]} as any
allowedMetadata.forEach((key: string) => {
if (key in payload) currentFile[key] = payload[key]
})
currentFile.metadataPulled = true
//Vue.set(path, fileIndex, currentFile)
Vue.set(path, fileIndex, currentFile)
} else window.console.error('file not found in filetree: '+payload.filename)
},