Merge pull request #21395 from Snuffleupagus/DrawLayerBuilder-cancel-optional-chaining

Shorten the `DrawLayerBuilder.prototype.cancel` method a tiny bit
This commit is contained in:
Tim van der Meij 2026-06-07 14:35:40 +02:00 committed by GitHub
commit bfc33678da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,10 +68,7 @@ class DrawLayerBuilder {
cancel() {
this._cancelled = true;
if (!this.#drawLayer) {
return;
}
this.#drawLayer.destroy();
this.#drawLayer?.destroy();
this.#drawLayer = null;
}