mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Ensure _.isArray fallback returns a boolean value.
Former-commit-id: c96fb8e95c40d546099796f8337db6d4d3d33aea
This commit is contained in:
9
build.js
9
build.js
@@ -1916,6 +1916,7 @@
|
||||
if (isMobile) {
|
||||
source = replaceSupportProp(source, 'enumPrototypes', 'true');
|
||||
source = replaceSupportProp(source, 'nonEnumArgs', 'true');
|
||||
source = removeIsArrayFallback(source);
|
||||
}
|
||||
else {
|
||||
source = removeIsFunctionFallback(source);
|
||||
@@ -1938,7 +1939,6 @@
|
||||
source = removeSupportNodeClass(source);
|
||||
|
||||
if (!isMobile) {
|
||||
source = removeIsArrayFallback(source);
|
||||
source = removeSupportEnumPrototypes(source);
|
||||
source = removeSupportNonEnumArgs(source);
|
||||
|
||||
@@ -2187,13 +2187,6 @@
|
||||
'}'
|
||||
].join('\n'));
|
||||
|
||||
// replace `_.isArray`
|
||||
source = replaceFunction(source, 'isArray', [
|
||||
'var isArray = nativeIsArray || function(value) {',
|
||||
' return toString.call(value) == arrayClass;',
|
||||
'};'
|
||||
].join('\n'));
|
||||
|
||||
// replace `_.isEmpty`
|
||||
source = replaceFunction(source, 'isEmpty', [
|
||||
'function isEmpty(value) {',
|
||||
|
||||
Reference in New Issue
Block a user