Skip to content

Commit

Permalink
Update polyfills.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman authored Apr 12, 2024
1 parent d8244c2 commit 6217ac7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@ const ArrayConstructors = [
];

ArrayConstructors.forEach((ArrayConstructor) => {
ArrayConstructor.prototype.at = ArrayConstructor.prototype.at ?? at;
if (!Object.prototype.hasOwnProperty.call(ArrayConstructor, "at")) {
ArrayConstructor.prototype.at = at;
}
});

0 comments on commit 6217ac7

Please sign in to comment.