diff --git a/src/store/folders.js b/src/store/folders.js index efcf4f5da..0d92b7eb8 100644 --- a/src/store/folders.js +++ b/src/store/folders.js @@ -20,6 +20,10 @@ const mutations = { * @param {Array} data.files list of files */ updateFolders(state, { fileid, files }) { + if (!state.folders[fileid]) { + Vue.set(state.folders, fileid, []) + } + if (files.length > 0) { // sort by last modified const list = files @@ -69,6 +73,7 @@ const mutations = { const getters = { folders: state => state.folders, + paths: state => state.paths, folder: state => fileid => state.folders[fileid], folderId: state => path => state.paths[path], } diff --git a/src/views/Folders.vue b/src/views/Folders.vue index e83da3167..aa6891bbb 100644 --- a/src/views/Folders.vue +++ b/src/views/Folders.vue @@ -5,14 +5,16 @@