fix source

This commit is contained in:
Qiuxia Fan 2022-06-23 16:37:22 +08:00
parent 966195ce87
commit 2d5a082894

View File

@ -142,8 +142,12 @@ export function useSourceProcessor(
ElMessage.error(resp.errors);
return {};
}
if (!resp.data) {
ElMessage.error("The query is wrong");
return {};
}
const source: { [key: string]: unknown } = {};
const keys = Object.keys((resp && resp.data) || {});
const keys = Object.keys(resp.data);
config.metricTypes.forEach((type: string, index) => {
const m = config.metrics[index];