mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-16 17:51:23 +02:00
Fix manage, chapters edit tracks and library stats page not setting the current library properly #4170
This commit is contained in:
@@ -195,10 +195,15 @@ export default {
|
||||
return redirect('/?error=invalid media type')
|
||||
}
|
||||
if (!libraryItem.media.audioFiles.length) {
|
||||
cnosole.error('No audio files')
|
||||
console.error('No audio files')
|
||||
return redirect('/?error=no audio files')
|
||||
}
|
||||
|
||||
// Fetch and set library if this items library does not match the current
|
||||
if (store.state.libraries.currentLibraryId !== libraryItem.libraryId || !store.state.libraries.filterData) {
|
||||
await store.dispatch('libraries/fetch', libraryItem.libraryId)
|
||||
}
|
||||
|
||||
return {
|
||||
libraryItem
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user