mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Ensure unknown objectTypes return false.
Former-commit-id: a60236ecd8908a91c0268d71d5710665986f1ceb
This commit is contained in:
@@ -1810,7 +1810,7 @@
|
||||
// http://es5.github.com/#x8
|
||||
// and avoid a V8 bug
|
||||
// http://code.google.com/p/v8/issues/detail?id=2291
|
||||
return value ? objectTypes[typeof value] : false;
|
||||
return !!(value && objectTypes[typeof value]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1931,7 +1931,7 @@
|
||||
* // => true
|
||||
*/
|
||||
function isRegExp(value) {
|
||||
return value ? (objectTypes[typeof value] && toString.call(value) == regexpClass) : false;
|
||||
return !!(value && objectTypes[typeof value]) && toString.call(value) == regexpClass);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user