Поправлен баг - не распознавались картинки, если в fb2 указан binaryType == 'application/octet-stream'

This commit is contained in:
Book Pauk
2019-08-29 15:25:50 +07:00
parent 454004e705
commit 15ec362428

View File

@@ -179,7 +179,7 @@ export default class BookParser {
if (tag == 'binary') {
let attrs = sax.getAttrsSync(tail);
binaryType = (attrs['content-type'] && attrs['content-type'].value ? attrs['content-type'].value : '');
if (binaryType == 'image/jpeg' || binaryType == 'image/png')
if (binaryType == 'image/jpeg' || binaryType == 'image/png' || binaryType == 'application/octet-stream')
binaryId = (attrs.id.value ? attrs.id.value : '');
}