Skip to content
Snippets Groups Projects
Unverified Commit 76fac0c7 authored by Ariya Hidayat's avatar Ariya Hidayat Committed by GitHub
Browse files

Use native `Array.isArray` to check for array type (#22653)

parent 17aa0737
No related branches found
Tags v0.49.3 v1.49.3
No related merge requests found
......@@ -71,7 +71,6 @@ declare module "underscore" {
declare function isEmpty(o: any): boolean;
declare function isString(o: any): boolean;
declare function isObject(o: any): boolean;
declare function isArray(o: any): boolean;
declare function groupBy<T>(
a: Array<T>,
......
......@@ -52,7 +52,7 @@ export class RestfulRequest {
mergeToDictionary = (dict, result) => {
dict = dict || {};
result = _.isArray(result)
result = Array.isArray(result)
? _.indexBy(result, "id")
: { [result.id]: result };
......
......@@ -89,7 +89,7 @@ describe("scenarios > auth > signin", () => {
sizes.forEach(size => {
it(`should redirect from /auth/forgot_password back to /auth/login (viewport: ${size}) (metabase#12658)`, () => {
if (Cypress._.isArray(size)) {
if (Array.isArray(size)) {
cy.viewport(size[0], size[1]);
} else {
cy.viewport(size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment