mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Ensure _.isArray fallback returns a boolean value.
Former-commit-id: c96fb8e95c40d546099796f8337db6d4d3d33aea
This commit is contained in:
@@ -960,7 +960,7 @@
|
||||
* // => true
|
||||
*/
|
||||
var isArray = nativeIsArray || function(value) {
|
||||
return value && typeof value == 'object' && toString.call(value) == arrayClass;
|
||||
return value ? (typeof value == 'object' && toString.call(value) == arrayClass) : false;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1467,7 +1467,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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1921,7 +1921,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