mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Replace some ternary operators with optional chaining, and nullish coalescing, in the src/display/
-folder
This way, we can further reduce unnecessary code-repetition in some cases.
This commit is contained in:
parent
172abc02e1
commit
298ee5cfbb
7 changed files with 8 additions and 14 deletions
|
@ -981,10 +981,7 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
|||
this.addFontStyle(fontObj);
|
||||
this.embeddedFonts[fontObj.loadedName] = fontObj;
|
||||
}
|
||||
|
||||
current.fontMatrix = fontObj.fontMatrix
|
||||
? fontObj.fontMatrix
|
||||
: FONT_IDENTITY_MATRIX;
|
||||
current.fontMatrix = fontObj.fontMatrix || FONT_IDENTITY_MATRIX;
|
||||
|
||||
let bold = "normal";
|
||||
if (fontObj.black) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue