Skip to content

Commit eaa7363

Browse files
authored
fix(dashboards): Fix an infinite loop on org dashboards (#88079)
Not sure why this started to happen after #86531 - but there's an infinite redirect from [this useEffect in orgDashboards](https://github.com/getsentry/sentry/blob/8bcc3f4919783894250c4040d329f1e4e86a5c8e/static/app/views/dashboards/orgDashboards.tsx#L92-L127). The `selectedDashboard` being passed to `hasSavedPageFilters` does not have a `projects` property on it and so is incorrectly returning true. Fixes JAVASCRIPT-2Y6A
1 parent 2a12df8 commit eaa7363

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

static/app/views/dashboards/utils.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,7 @@ export function isWidgetUsingTransactionName(widget: Widget) {
468468

469469
export function hasSavedPageFilters(dashboard: DashboardDetails) {
470470
return !(
471-
dashboard.projects &&
472-
dashboard.projects.length === 0 &&
471+
(dashboard.projects === undefined || dashboard.projects.length === 0) &&
473472
dashboard.environment === undefined &&
474473
dashboard.start === undefined &&
475474
dashboard.end === undefined &&

0 commit comments

Comments
 (0)