mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Ensure _.isArray fallback returns a boolean value.
Former-commit-id: c96fb8e95c40d546099796f8337db6d4d3d33aea
This commit is contained in:
6
dist/lodash.underscore.js
vendored
6
dist/lodash.underscore.js
vendored
@@ -500,7 +500,7 @@
|
||||
* // => true
|
||||
*/
|
||||
var isArray = nativeIsArray || function(value) {
|
||||
return toString.call(value) == arrayClass;
|
||||
return value ? (typeof value == 'object' && toString.call(value) == arrayClass) : false;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -871,7 +871,7 @@
|
||||
* // => true
|
||||
*/
|
||||
function isDate(value) {
|
||||
return value ? typeof value == 'object' && toString.call(value) == dateClass : false;
|
||||
return value ? (typeof value == 'object' && toString.call(value) == dateClass) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1230,7 +1230,7 @@
|
||||
* // => true
|
||||
*/
|
||||
function isRegExp(value) {
|
||||
return value ? typeof value == 'object' && toString.call(value) == regexpClass : false;
|
||||
return value ? (typeof value == 'object' && toString.call(value) == regexpClass) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user