andrewplummer / Sugar

A Javascript library for working with native objects.
https://sugarjs.com/
MIT License
4.54k stars 305 forks source link

TypeError · Unable to get property 'apply' of undefined or null referenc #657

Closed alexoxte closed 5 years ago

alexoxte commented 5 years ago

-- function wrapNativeArrayMethod(methodName, wrapper) {   | var nativeFn = Array.prototype[methodName];   | return function (arr, f, context, argsLen) {   | var args = new Array(2);   | assertArgument(argsLen > 0);   | args[0] = wrapper(f, context);   | args[1] = context;

.......