diff --git a/lib/polyfills.ts b/lib/polyfills.ts index 4d15e1dc..4d2c5632 100644 --- a/lib/polyfills.ts +++ b/lib/polyfills.ts @@ -46,5 +46,7 @@ const ArrayConstructors = [ ]; ArrayConstructors.forEach((ArrayConstructor) => { - ArrayConstructor.prototype.at = ArrayConstructor.prototype.at ?? at; + if (!Object.prototype.hasOwnProperty.call(ArrayConstructor, 'at')) { + ArrayConstructor.prototype.at = at; + } });