mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Remove unreachable logic after error(...) is called.
The function error(...) always throws so there is no need to return separately or have an else branch.
This commit is contained in:
parent
cdbbd76594
commit
eb4ec7899a
5 changed files with 29 additions and 44 deletions
|
@ -514,7 +514,6 @@ var XRef = (function XRefClosure() {
|
|||
return dict;
|
||||
// nothing helps
|
||||
error('Invalid PDF structure');
|
||||
return null;
|
||||
},
|
||||
readXRef: function readXref(startXRef) {
|
||||
var stream = this.stream;
|
||||
|
@ -723,12 +722,10 @@ var PDFObjects = (function PDFObjectsClosure() {
|
|||
|
||||
// If there isn't an object yet or the object isn't resolved, then the
|
||||
// data isn't ready yet!
|
||||
if (!obj || !obj.isResolved) {
|
||||
if (!obj || !obj.isResolved)
|
||||
error('Requesting object that isn\'t resolved yet ' + objId);
|
||||
return null;
|
||||
} else {
|
||||
return obj.data;
|
||||
}
|
||||
|
||||
return obj.data;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue