Commit 0b65558c by Johannes Schill

react-panel: Add nullcheck to prevent error on datasources without meta options

parent e0fb89cf
......@@ -202,10 +202,12 @@ export class QueriesTab extends PureComponent<Props, State> {
},
};
const dsOptions = Object.keys(queryOptions).map(key => {
const options = allOptions[key];
return <DataSourceOption key={key} {...options} onChange={onChangeFn(allOptions[key].panelKey || key)} />;
});
const dsOptions = queryOptions
? Object.keys(queryOptions).map(key => {
const options = allOptions[key];
return <DataSourceOption key={key} {...options} onChange={onChangeFn(allOptions[key].panelKey || key)} />;
})
: null;
return (
<>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment