Skip to content

Commit

Permalink
[Robustness] ensure main export callBinds
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 14, 2021
1 parent 665f6b7 commit f0ab610
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
'use strict';

var callBind = require('call-bind');
var define = require('define-properties');
var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible');

var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var polyfill = callBind(getPolyfill());
var shim = require('./shim');

var boundShim = function at(array, index) {
RequireObjectCoercible(array);
return polyfill.call(array, index);
return polyfill(array, index);
};
define(boundShim, {
getPolyfill: getPolyfill,
Expand Down

0 comments on commit f0ab610

Please sign in to comment.