mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Enable the prefer-promise-reject-errors
ESLint rule
See http://eslint.org/docs/rules/prefer-promise-reject-errors, note that this is similar to the already used `no-throw-literal` rule.
This commit is contained in:
parent
55a853b667
commit
f41d80bdd3
2 changed files with 2 additions and 1 deletions
|
@ -843,7 +843,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
operatorList.addOp(fn, pattern.getIR());
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject('Unknown PatternType: ' + typeNum);
|
||||
return Promise.reject(new Error('Unknown PatternType: ' + typeNum));
|
||||
}
|
||||
// TODO shall we fail here?
|
||||
operatorList.addOp(fn, args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue