File tree Expand file tree Collapse file tree
components/ConsoleEditor/components/SelectBoundInfo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ const SelectBoundInfo = memo((props: IProps) => {
105105
106106 // 获取数据库列表
107107 const getDatabaseList = ( ) => {
108+ if ( boundInfo . dataSourceId === undefined || boundInfo . dataSourceId === null ) {
109+ return
110+ }
108111 connectionService
109112 . getDatabaseList ( {
110113 dataSourceId : boundInfo . dataSourceId ,
@@ -131,8 +134,8 @@ const SelectBoundInfo = memo((props: IProps) => {
131134
132135 // 获取schema列表
133136 const getSchemaList = ( ) => {
134- if ( boundInfo . databaseName === null || boundInfo . databaseName === undefined ) {
135- return ;
137+ if ( boundInfo . dataSourceId === undefined || boundInfo . dataSourceId === null ) {
138+ return
136139 }
137140 connectionService
138141 . getSchemaList ( {
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ const getDatabaseList = createRequest<{ dataSourceId: number; refresh?: boolean
5959 method : 'get' ,
6060} ) ;
6161
62- const getSchemaList = createRequest < { dataSourceId : number ; databaseName : string ; refresh ?: boolean } , any > (
62+ const getSchemaList = createRequest < { dataSourceId : number ; databaseName ? : string ; refresh ?: boolean } , any > (
6363 '/api/rdb/schema/list' ,
6464 { method : 'get' } ,
6565) ;
You can’t perform that action at this time.
0 commit comments