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 63e52b5 commit c4d7412
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/ui.browserscope.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
ctor,
result = data;

if (_.isArray(data)) {
if (Array.isArray(data)) {
result = _.map(data, cloneData);
}
else if (data === Object(data)) {
Expand Down Expand Up @@ -372,7 +372,7 @@
// resolve cells by duck typing because of munged property names
var result = [];
_.forOwn(object, function(value) {
return !(_.isArray(value) && (result = value));
return !(Array.isArray(value) && (result = value));
});
// remove empty entries which occur when not all the tests are recorded
return _.compact(result);
Expand All @@ -391,7 +391,7 @@

// resolve labels by duck typing because of munged property names
_.forOwn(object, function(value) {
return !(_.isArray(value) && 0 in value && 'type' in value[0] && (result = value));
return !(Array.isArray(value) && 0 in value && 'type' in value[0] && (result = value));
});
// create a data map of labels to names
_.each(ui.benchmarks, function(bench) {
Expand Down Expand Up @@ -423,7 +423,7 @@

// resolve rows by duck typing because of munged property names
_.forOwn(object, function(value, key) {
return !(_.isArray(value) && 0 in value && !('type' in value[0]) && (name = key, result = value));
return !(Array.isArray(value) && 0 in value && !('type' in value[0]) && (name = key, result = value));
});
// remove empty rows and set the `p.className` on the browser
// name cell that matches the user's browser name
Expand Down

0 comments on commit c4d7412

Please sign in to comment.