Chore: Fix small type check issues (#97341)

small type check fixes
This commit is contained in:
ismail simsek 2024-12-06 10:24:32 +01:00 committed by GitHub
parent ae9460b863
commit 492c1ebc0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ export class LayoutSwitcher extends SceneObjectBase<LayoutSwitcherState> impleme
updateFromUrl(values: SceneObjectUrlValues) {
const newBreakdownLayout = values.breakdownLayout;
if (newBreakdownLayout === 'string' && isBreakdownLayoutType(newBreakdownLayout)) {
if (typeof newBreakdownLayout === 'string' && isBreakdownLayoutType(newBreakdownLayout)) {
if (this.state.activeBreakdownLayout !== newBreakdownLayout) {
this.setState({ activeBreakdownLayout: newBreakdownLayout });
}

View File

@ -97,7 +97,7 @@ export function getDatasourceForNewTrail(): string | undefined {
const prevTrail = getTrailStore().recent[0];
if (prevTrail) {
const prevDataSource = sceneGraph.interpolate(prevTrail.resolve(), VAR_DATASOURCE_EXPR);
if (typeof prevDataSource === 'string' && prevDataSource.length > 0) {
if (prevDataSource.length > 0) {
return prevDataSource;
}
}