mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fixed strict null errors (#22238)
This commit is contained in:
@@ -273,7 +273,7 @@ describe('DashboardPage', () => {
|
||||
},
|
||||
panelEditorNew: {},
|
||||
dashboard: {
|
||||
getModel: () => null as DashboardModel,
|
||||
getModel: () => ({} as DashboardModel),
|
||||
},
|
||||
} as any);
|
||||
|
||||
@@ -292,7 +292,7 @@ describe('DashboardPage', () => {
|
||||
},
|
||||
panelEditorNew: {},
|
||||
dashboard: {
|
||||
getModel: () => null as DashboardModel,
|
||||
getModel: () => ({} as DashboardModel),
|
||||
},
|
||||
} as any);
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ export class SoloPanelPage extends Component<Props, State> {
|
||||
return <div className="alert alert-error">Panel with id {urlPanelId} not found</div>;
|
||||
}
|
||||
|
||||
if (!panel) {
|
||||
if (!panel || !dashboard) {
|
||||
return <div>Loading & initializing dashboard</div>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user