Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few *safe* ESLint no-var failures in src/core/evaluator.js (13371 follow-up) #13387

Merged
merged 1 commit into from
May 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ class PartialEvaluator {
} else {
bbox = null;
}
let optionalContent = null;
let optionalContent = null,
groupOptions;
if (dict.has("OC")) {
optionalContent = await this.parseMarkedContentProps(
dict.get("OC"),
Expand All @@ -404,7 +405,7 @@ class PartialEvaluator {
}
const group = dict.get("Group");
if (group) {
var groupOptions = {
groupOptions = {
matrix,
bbox,
smask,
Expand Down Expand Up @@ -3766,7 +3767,7 @@ class PartialEvaluator {
throw new FormatError("invalid font name");
}

let fontFile;
let fontFile, subtype, length1, length2, length3;
try {
fontFile = descriptor.get("FontFile", "FontFile2", "FontFile3");
} catch (ex) {
Expand All @@ -3778,13 +3779,13 @@ class PartialEvaluator {
}
if (fontFile) {
if (fontFile.dict) {
var subtype = fontFile.dict.get("Subtype");
if (subtype) {
subtype = subtype.name;
const subtypeEntry = fontFile.dict.get("Subtype");
if (subtypeEntry instanceof Name) {
subtype = subtypeEntry.name;
}
var length1 = fontFile.dict.get("Length1");
var length2 = fontFile.dict.get("Length2");
var length3 = fontFile.dict.get("Length3");
length1 = fontFile.dict.get("Length1");
length2 = fontFile.dict.get("Length2");
length3 = fontFile.dict.get("Length3");
}
}

Expand Down