mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Enable the ESLint prefer-const
rule globally (PR 11450 follow-up)
Please find additional details about the ESLint rule at https://eslint.org/docs/rules/prefer-const With the recent introduction of Prettier this sort of mass enabling of ESLint rules becomes a lot easier, since the code will be automatically reformatted as necessary to account for e.g. changed line lengths. Note that this patch is generated automatically, by using the ESLint `--fix` argument, and will thus require some additional clean-up (which is done separately).
This commit is contained in:
parent
d2d9441373
commit
9e262ae7fa
54 changed files with 676 additions and 661 deletions
|
@ -425,7 +425,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
n = stack.pop();
|
||||
subrCode = null;
|
||||
if (font.isCFFCIDFont) {
|
||||
let fdIndex = font.fdSelect.getFDIndex(glyphId);
|
||||
const fdIndex = font.fdSelect.getFDIndex(glyphId);
|
||||
if (fdIndex >= 0 && fdIndex < font.fdArray.length) {
|
||||
let fontDict = font.fdArray[fdIndex],
|
||||
subrs;
|
||||
|
@ -757,9 +757,9 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
if (this.isCFFCIDFont) {
|
||||
// Top DICT's FontMatrix can be ignored because CFFCompiler always
|
||||
// removes it and copies to FDArray DICTs.
|
||||
let fdIndex = this.fdSelect.getFDIndex(glyphId);
|
||||
const fdIndex = this.fdSelect.getFDIndex(glyphId);
|
||||
if (fdIndex >= 0 && fdIndex < this.fdArray.length) {
|
||||
let fontDict = this.fdArray[fdIndex];
|
||||
const fontDict = this.fdArray[fdIndex];
|
||||
fontMatrix = fontDict.getByName("FontMatrix") || FONT_IDENTITY_MATRIX;
|
||||
} else {
|
||||
warn("Invalid fd index for glyph index.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue