From 6606c282ee97abe6af7fc5accc2e5126b05daf96 Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Wed, 11 Sep 2024 20:03:35 -0500 Subject: [PATCH] fix: Remove .at() es syntax --- src/engine/Resources/Gif.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/Resources/Gif.ts b/src/engine/Resources/Gif.ts index 115e02fb6..98f4d8609 100644 --- a/src/engine/Resources/Gif.ts +++ b/src/engine/Resources/Gif.ts @@ -616,7 +616,7 @@ export class GifParser { // A value of 3 is defined to mean that the decoder should restore the canvas to its previous state before the current image was drawn. // The behavior for values 4-7 are yet to be defined. if (this._gce?.disposalMethod === 1 && this.images.length) { - this._currentFrameContext.drawImage(this.images.at(-1)!, 0, 0); + this._currentFrameContext.drawImage(this.images[this.images.length - 1]!, 0, 0); } else if (this._gce?.disposalMethod === 2 && this._hdr?.gctFlag) { const bg = colorTable[this._hdr.backgroundColorIndex]; this._currentFrameContext.fillStyle = `rgb(${bg[0]}, ${bg[1]}, ${bg[2]})`;