Remove unnecessary explicit return statements in CanvasGraphics.prototype.showText

This commit is contained in:
Jonas Jenwald 2026-06-19 10:58:14 +02:00
parent 59df671552
commit 00e1aabe93

View File

@ -2670,13 +2670,13 @@ class CanvasGraphics {
this.showType3Text(opIdx, glyphs); this.showType3Text(opIdx, glyphs);
this.dependencyTracker?.recordShowTextOperation(opIdx); this.dependencyTracker?.recordShowTextOperation(opIdx);
this.#endKnockoutElement(started); this.#endKnockoutElement(started);
return undefined; return;
} }
const fontSize = current.fontSize; const fontSize = current.fontSize;
if (fontSize === 0) { if (fontSize === 0) {
this.dependencyTracker?.recordOperation(opIdx); this.dependencyTracker?.recordOperation(opIdx);
return undefined; return;
} }
const started = this.#beginKnockoutElement(current.fillAlpha); const started = this.#beginKnockoutElement(current.fillAlpha);
@ -2794,7 +2794,7 @@ class CanvasGraphics {
ctx.restore(); ctx.restore();
this.compose(); this.compose();
this.#endKnockoutElement(started); this.#endKnockoutElement(started);
return undefined; return;
} }
let x = 0, let x = 0,
@ -2910,7 +2910,6 @@ class CanvasGraphics {
this.dependencyTracker?.recordShowTextOperation(opIdx); this.dependencyTracker?.recordShowTextOperation(opIdx);
this.#endKnockoutElement(started); this.#endKnockoutElement(started);
return undefined;
} }
showType3Text(opIdx, glyphs) { showType3Text(opIdx, glyphs) {