1
0
Fork 0
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:
Jonas Jenwald 2017-04-08 11:47:22 +02:00
parent 55a853b667
commit f41d80bdd3
2 changed files with 2 additions and 1 deletions

View file

@ -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);