Chore: Fixed strict null errors (#22238)

This commit is contained in:
Torkel Ödegaard
2020-02-17 07:25:27 +01:00
committed by GitHub
parent f1ecaa5d45
commit 4ca3967091
12 changed files with 30 additions and 41 deletions

View File

@@ -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);

View File

@@ -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>;
}