1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Enable the unicorn/prefer-optional-catch-binding ESLint plugin rule

According to MDN this format is available in all browsers/environments that we currently support, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch#browser_compatibility

Please also see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md
This commit is contained in:
Jonas Jenwald 2023-06-12 11:46:11 +02:00
parent 9af50dc358
commit fee850737b
32 changed files with 45 additions and 44 deletions

View file

@ -28,7 +28,7 @@ class CFFFont {
this.seacs = this.cff.seacs;
try {
this.data = compiler.compile();
} catch (e) {
} catch {
warn("Failed to compile font " + properties.loadedName);
// There may have just been an issue with the compiler, set the data
// anyway and hope the font loaded.