mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-22 00:07:52 +01:00
bug: if oldLibraryItem is null things crash
This commit is contained in:
parent
8cadaa57f6
commit
f9e270e4be
@ -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…
Reference in New Issue
Block a user