Fix:OPF parser crash when no narrators #1578

This commit is contained in:
advplyr 2023-03-05 12:40:21 -06:00
parent aef2c52630
commit 3df7caa838
2 changed files with 3 additions and 3 deletions

View file

@ -296,7 +296,7 @@ class Book {
})
}
} else if (key === 'narrators') {
if (opfMetadata.narrators && opfMetadata.narrators.length && (!this.metadata.narrators.length || opfMetadataOverrideDetails)) {
if (opfMetadata.narrators?.length && (!this.metadata.narrators.length || opfMetadataOverrideDetails)) {
metadataUpdatePayload.narrators = opfMetadata.narrators
}
} else if (key === 'series') {