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
No related tags found
No related merge requests found
...@@ -71,7 +71,6 @@ declare module "underscore" { ...@@ -71,7 +71,6 @@ declare module "underscore" {
declare function isEmpty(o: any): boolean; declare function isEmpty(o: any): boolean;
declare function isString(o: any): boolean; declare function isString(o: any): boolean;
declare function isObject(o: any): boolean; declare function isObject(o: any): boolean;
declare function isArray(o: any): boolean;
declare function groupBy<T>( declare function groupBy<T>(
a: Array<T>, a: Array<T>,
......
...@@ -52,7 +52,7 @@ export class RestfulRequest { ...@@ -52,7 +52,7 @@ export class RestfulRequest {
mergeToDictionary = (dict, result) => { mergeToDictionary = (dict, result) => {
dict = dict || {}; dict = dict || {};
result = _.isArray(result) result = Array.isArray(result)
? _.indexBy(result, "id") ? _.indexBy(result, "id")
: { [result.id]: result }; : { [result.id]: result };
......
...@@ -89,7 +89,7 @@ describe("scenarios > auth > signin", () => { ...@@ -89,7 +89,7 @@ describe("scenarios > auth > signin", () => {
sizes.forEach(size => { sizes.forEach(size => {
it(`should redirect from /auth/forgot_password back to /auth/login (viewport: ${size}) (metabase#12658)`, () => { 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]); cy.viewport(size[0], size[1]);
} else { } else {
cy.viewport(size); 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