mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-09 13:29:37 +00:00
bug: if oldLibraryItem is null things crash
This commit is contained in:
parent
8cadaa57f6
commit
f9e270e4be
1 changed files with 5 additions and 3 deletions
|
|
@ -176,9 +176,11 @@ class LibraryScanner {
|
||||||
|
|
||||||
// TODO: Temporary while using old model to socket emit
|
// TODO: Temporary while using old model to socket emit
|
||||||
const oldLibraryItem = await Database.libraryItemModel.getOldById(existingLibraryItem.id)
|
const oldLibraryItem = await Database.libraryItemModel.getOldById(existingLibraryItem.id)
|
||||||
oldLibraryItem.isMissing = true
|
if (oldLibraryItem) {
|
||||||
oldLibraryItem.updatedAt = Date.now()
|
oldLibraryItem.isMissing = true
|
||||||
oldLibraryItemsUpdated.push(oldLibraryItem)
|
oldLibraryItem.updatedAt = Date.now()
|
||||||
|
oldLibraryItemsUpdated.push(oldLibraryItem)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue