From c8129b878755b0885f09ee4e6ae6efc44eefe8ff Mon Sep 17 00:00:00 2001 From: Brendan Dahl <brendan.dahl@gmail.com> Date: Fri, 16 Aug 2019 14:32:43 -0700 Subject: [PATCH] Move polyfill for codePointAt to String prototype. This method belongs on the prototype not the String object. --- src/shared/compatibility.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index c67de876d..30be7219e 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -227,10 +227,10 @@ const hasDOM = typeof window === 'object' && typeof document === 'object'; // Provides support for String.codePointAt in legacy browsers. // Support: IE11. (function checkStringCodePointAt() { - if (String.codePointAt) { + if (String.prototype.codePointAt) { return; } - String.codePointAt = require('core-js/fn/string/code-point-at'); + require('core-js/fn/string/code-point-at'); })(); // Provides support for String.fromCodePoint in legacy browsers.