Skip to content

Commit

Permalink
fixing forEach on null variable (#801)
Browse files Browse the repository at this point in the history
Co-authored-by: Alfred Rubin <alfredo.rubin@neo4j.com>
  • Loading branch information
nielsdejong and alfredorubin96 committed Feb 28, 2024
1 parent 19401a3 commit f700e57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dashboard/DashboardThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export function patchDashboardVersion(dashboard: any, version: any) {
dashboard.pages.forEach((p) => {
p.reports.forEach((r) => {
if (r.type == 'graph' || r.type == 'map' || r.type == 'graph3d') {
r.settings?.actionsRules.forEach((rule) => {
r.settings?.actionsRules?.forEach((rule) => {
if (
rule?.field &&
(rule?.condition === 'onNodeClick' || rule?.condition == 'Click') &&
Expand Down Expand Up @@ -585,7 +585,7 @@ export function upgradeDashboardVersion(dashboard: any, origin: string, target:
r.height *= 2;

if (r.type == 'graph' || r.type == 'map' || r.type == 'graph3d') {
r.settings?.actionsRules.forEach((rule) => {
r.settings?.actionsRules?.forEach((rule) => {
if (
rule?.field &&
(rule?.condition === 'onNodeClick' || rule?.condition == 'Click') &&
Expand Down

0 comments on commit f700e57

Please sign in to comment.