Move polyfill for codePointAt to String prototype.
This method belongs on the prototype not the String object.
This commit is contained in:
parent
02dcd20263
commit
c8129b8787
@ -227,10 +227,10 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
// Provides support for String.codePointAt in legacy browsers.
|
// Provides support for String.codePointAt in legacy browsers.
|
||||||
// Support: IE11.
|
// Support: IE11.
|
||||||
(function checkStringCodePointAt() {
|
(function checkStringCodePointAt() {
|
||||||
if (String.codePointAt) {
|
if (String.prototype.codePointAt) {
|
||||||
return;
|
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.
|
// Provides support for String.fromCodePoint in legacy browsers.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user