added check for array (#100164)

This commit is contained in:
Devon Thomson 2021-05-18 09:39:53 -04:00 committed by GitHub
parent 5c3527d8a6
commit bc5472d5da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);