Skip to content

Commit

Permalink
Check for length property > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Xotic750 committed Dec 9, 2015
1 parent 7c53fef commit 1b567ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es5-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ defineProperties(FunctionPrototype, {
return toStringTag(thisArg);
}
// All other applys.
if (arguments.length > 1 && type === 'object' && argsArray) {
if (arguments.length > 1 && type === 'object' && argsArray && argsArray.length > 0) {
// Boxed string access bug fix.
if (splitString && to_string.call(thisArg) === '[object String]') {
// `str_split` is safe to use here, no known issue at present.
Expand Down

0 comments on commit 1b567ad

Please sign in to comment.