Compare commits

...

1 Commits

Author SHA1 Message Date
Ashwin Bhatkal
e0cc7300e6 fix: guard widgets against undefined in handleRowCollapse 2026-03-24 20:11:47 +05:30

View File

@@ -337,9 +337,9 @@ function GraphLayout(props: GraphLayoutProps): JSX.Element {
for (let j = idxCurrentRow + 1; j < dashboardLayout.length; j++) {
updatedDashboardLayout[j].y += maxY;
if (updatedPanelMap[updatedDashboardLayout[j].i]) {
updatedPanelMap[updatedDashboardLayout[j].i].widgets = updatedPanelMap[
updatedDashboardLayout[j].i
].widgets.map((w) => ({
updatedPanelMap[updatedDashboardLayout[j].i].widgets = (
updatedPanelMap[updatedDashboardLayout[j].i].widgets ?? []
).map((w) => ({
...w,
y: w.y + maxY,
}));
@@ -376,9 +376,9 @@ function GraphLayout(props: GraphLayoutProps): JSX.Element {
for (let j = currentIdx + 1; j < updatedDashboardLayout.length; j++) {
updatedDashboardLayout[j].y += maxY;
if (updatedPanelMap[updatedDashboardLayout[j].i]) {
updatedPanelMap[updatedDashboardLayout[j].i].widgets = updatedPanelMap[
updatedDashboardLayout[j].i
].widgets.map((w) => ({
updatedPanelMap[updatedDashboardLayout[j].i].widgets = (
updatedPanelMap[updatedDashboardLayout[j].i].widgets ?? []
).map((w) => ({
...w,
y: w.y + maxY,
}));