Selaa lähdekoodia

DataSourceSettings: Minor fix for uncontrolled input (#16863)

Torkel Ödegaard 6 vuotta sitten
vanhempi
commit
20dada0159

+ 1 - 1
public/app/features/datasources/settings/DataSourceSettingsPage.tsx

@@ -171,7 +171,7 @@ export class DataSourceSettingsPage extends PureComponent<Props, State> {
   }
 
   get hasDataSource() {
-    return Object.keys(this.props.dataSource).length > 0;
+    return this.state.dataSource.id > 0;
   }
 
   render() {