Skip to content

Commit

Permalink
one more #1161 workaround, for the pure version export context case
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jan 10, 2023
1 parent 47bdf63 commit d7716d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core-js-pure/override/internals/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module.exports = function (options, source) {

if (USE_NATIVE && typeof targetProperty == typeof sourceProperty) continue;

// bind timers to global for call from export context
// bind methods to global for calling from export context
if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);
// wrap global constructors for prevent changs in this version
else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js/modules/web.atob.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var WRONG_ARITY = !NO_SPACES_IGNORE && !NO_ENCODING_CHECK && $atob.length !== 1;

// `atob` method
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-atob
$({ global: true, enumerable: true, forced: NO_SPACES_IGNORE || NO_ENCODING_CHECK || NO_ARG_RECEIVING_CHECK || WRONG_ARITY }, {
$({ global: true, bind: true, enumerable: true, forced: NO_SPACES_IGNORE || NO_ENCODING_CHECK || NO_ARG_RECEIVING_CHECK || WRONG_ARITY }, {
atob: function atob(data) {
validateArgumentsLength(arguments.length, 1);
// `webpack` dev server bug on IE global methods - use call(fn, global, ...)
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js/modules/web.btoa.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var WRONG_ARITY = !!$btoa && $btoa.length !== 1;

// `btoa` method
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-btoa
$({ global: true, enumerable: true, forced: NO_ARG_RECEIVING_CHECK || WRONG_ARG_CONVERSION || WRONG_ARITY }, {
$({ global: true, bind: true, enumerable: true, forced: NO_ARG_RECEIVING_CHECK || WRONG_ARG_CONVERSION || WRONG_ARITY }, {
btoa: function btoa(data) {
validateArgumentsLength(arguments.length, 1);
// `webpack` dev server bug on IE global methods - use call(fn, global, ...)
Expand Down

0 comments on commit d7716d4

Please sign in to comment.