Browse Source

Поправлен баг

Book Pauk 4 years ago
parent
commit
8cb67d2976
1 changed files with 1 additions and 0 deletions
  1. 1 0
      client/components/Reader/share/BookParser.js

+ 1 - 0
client/components/Reader/share/BookParser.js

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