Skip to content

Commit

Permalink
added check for array (#100164)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomThomson authored May 18, 2021
1 parent 5c3527d commit bc5472d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/dashboard/common/saved_dashboard_references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ export function extractReferences(
}

const { panels, state } = dashboardAttributesToState(attributes);
if (!Array.isArray(panels)) {
return { attributes, references };
}

if (((panels as unknown) as Array<Record<string, string>>).some(isPre730Panel)) {
return pre730ExtractReferences({ attributes, references }, deps);
Expand Down

0 comments on commit bc5472d

Please sign in to comment.