Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Commit

Permalink
replace _.isArray with Array.isArray
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Mar 7, 2022
1 parent 7c12234 commit 63e52b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
*/
var cloneDeep = _.partial(_.cloneDeepWith, _, function(value) {
// Only clone primitives, arrays, and plain objects.
if (!_.isArray(value) && !_.isPlainObject(value)) {
if (!Array.isArray(value) && !_.isPlainObject(value)) {
return value;
}
});
Expand Down Expand Up @@ -942,7 +942,7 @@
// 2 arguments (array, options).
options = _.assign(options, name);
name = options.name;
args = _.isArray(args = 'args' in options ? options.args : []) ? args : [args];
args = Array.isArray(args = 'args' in options ? options.args : []) ? args : [args];
queued = options.queued;
}
// Start iterating over the array.
Expand Down Expand Up @@ -1473,9 +1473,9 @@
return;
}
if (_.isObjectLike(value)) {
if (_.isArray(value)) {
if (Array.isArray(value)) {
// Check if an array value has changed to a non-array value.
if (!_.isArray(currValue)) {
if (!Array.isArray(currValue)) {
changed = true;
currValue = [];
}
Expand Down

0 comments on commit 63e52b5

Please sign in to comment.