[web] Fix a bug preventing the files page to not load when refreshing page
This commit is contained in:
parent
60f14adb47
commit
ff9537514a
|
@ -60,7 +60,15 @@ const dataObject = {
|
|||
vm.playlists = new GroupedList(response.data.playlists)
|
||||
vm.tracks = new GroupedList(response.data.tracks)
|
||||
} else {
|
||||
vm.dirs = vm.$store.state.config.directories.map((dir) => ({ path: dir }))
|
||||
if (vm.$store.state.config.directories) {
|
||||
vm.dirs = vm.$store.state.config.directories.map((dir) => ({
|
||||
path: dir
|
||||
}))
|
||||
} else {
|
||||
webapi.config().then((config) => {
|
||||
vm.dirs = config.data.directories.map((dir) => ({ path: dir }))
|
||||
})
|
||||
}
|
||||
vm.playlists = new GroupedList()
|
||||
vm.tracks = new GroupedList()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue