mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-12 21:21:04 +02:00
Merge pull request #21395 from Snuffleupagus/DrawLayerBuilder-cancel-optional-chaining
Shorten the `DrawLayerBuilder.prototype.cancel` method a tiny bit
This commit is contained in:
commit
bfc33678da
@ -68,10 +68,7 @@ class DrawLayerBuilder {
|
||||
cancel() {
|
||||
this._cancelled = true;
|
||||
|
||||
if (!this.#drawLayer) {
|
||||
return;
|
||||
}
|
||||
this.#drawLayer.destroy();
|
||||
this.#drawLayer?.destroy();
|
||||
this.#drawLayer = null;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user