Skip to content

Commit 6ecd455

Browse files
authored
fix: prevent embed flash of "Failed to load dashboard" due to race in time range query (#9132)
1 parent 407f7f9 commit 6ecd455

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

web-common/src/features/dashboards/state-managers/loaders/DashboardStateDataLoader.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,10 @@ export class DashboardStateDataLoader {
251251
}
252252

253253
if (
254-
fullTimeRange.data?.timeRangeSummary?.min == null &&
255-
fullTimeRange.data?.timeRangeSummary?.max == null
254+
!fullTimeRange.isLoading &&
255+
fullTimeRange.data &&
256+
fullTimeRange.data.timeRangeSummary?.min == null &&
257+
fullTimeRange.data.timeRangeSummary?.max == null
256258
) {
257259
// The timeRangeSummary is null when there are 0 rows of data.
258260
// Notably, this happens when a security policy fully restricts a user from reading any data.

0 commit comments

Comments
 (0)