mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix(数据源): 没有数据源,点击创建数据集,页面卡住,控制台报错 #16831
This commit is contained in:
@@ -1357,7 +1357,7 @@ const getSqlResultHeight = () => {
|
||||
const getDatasource = (weight?: number) => {
|
||||
getDatasourceList(weight).then(res => {
|
||||
const _list = (res as unknown as DataSource[]) || []
|
||||
if (_list && _list.length > 0 && _list[0].id === '0') {
|
||||
if (_list && _list.length > 0 && _list[0].id === '0' && _list[0].children?.length) {
|
||||
state.dataSourceList = dfsChild(_list[0].children)
|
||||
} else {
|
||||
state.dataSourceList = dfsChild(_list)
|
||||
|
||||
Reference in New Issue
Block a user