mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +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
|
@ -1506,10 +1506,7 @@ const CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
if (!fontObj) {
|
||||
throw new Error(`Can't find font for ${fontRefName}`);
|
||||
}
|
||||
|
||||
current.fontMatrix = fontObj.fontMatrix
|
||||
? fontObj.fontMatrix
|
||||
: FONT_IDENTITY_MATRIX;
|
||||
current.fontMatrix = fontObj.fontMatrix || FONT_IDENTITY_MATRIX;
|
||||
|
||||
// A valid matrix needs all main diagonal elements to be non-zero
|
||||
// This also ensures we bypass FF bugzilla bug #719844.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue