mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-09 14:54:04 +02:00
Use optional chaining a little bit more in the src/display/api.js file
That format is preferred where possible, since it leads to ever so slightly shorter code overall.
This commit is contained in:
parent
873378b718
commit
5ef582fb20
@ -1530,10 +1530,9 @@ class PDFPageProxy {
|
||||
this._pumpOperatorList(intentArgs);
|
||||
}
|
||||
|
||||
const recordForDebugger = Boolean(
|
||||
const recordForDebugger = !!(
|
||||
this._pdfBug && globalThis.StepperManager?.enabled
|
||||
);
|
||||
|
||||
const shouldRecordOperations =
|
||||
!this.recordedBBoxes && (recordOperations || recordForDebugger);
|
||||
|
||||
@ -1543,12 +1542,11 @@ class PDFPageProxy {
|
||||
if (shouldRecordOperations) {
|
||||
const recordedBBoxes = internalRenderTask.gfx?.dependencyTracker.take();
|
||||
if (recordedBBoxes) {
|
||||
if (internalRenderTask.stepper) {
|
||||
internalRenderTask.stepper.setOperatorBBoxes(
|
||||
recordedBBoxes,
|
||||
internalRenderTask.gfx.dependencyTracker.takeDebugMetadata()
|
||||
);
|
||||
}
|
||||
internalRenderTask.stepper?.setOperatorBBoxes(
|
||||
recordedBBoxes,
|
||||
internalRenderTask.gfx.dependencyTracker.takeDebugMetadata()
|
||||
);
|
||||
|
||||
if (recordOperations) {
|
||||
this.recordedBBoxes = recordedBBoxes;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user