Skip to content

Commit

Permalink
fix: Remove .at() es syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Sep 12, 2024
1 parent b095216 commit 6606c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/Resources/Gif.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]})`;
Expand Down

0 comments on commit 6606c28

Please sign in to comment.