File tree Expand file tree Collapse file tree
screens/surrealist/pages/Connection/connection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -931,6 +931,13 @@ async function isNamespaceValid(namespace: string) {
931931}
932932
933933async function isDatabaseValid ( database : string ) {
934+ const connection = getConnection ( ) ;
935+ const authDB = connection && getAuthDB ( connection . authentication ) ;
936+
937+ if ( authDB === database ) {
938+ return true ;
939+ }
940+
934941 try {
935942 const [ result ] = await instance . query ( "INFO FOR NS" ) . collect < [ SchemaInfoNS ] > ( ) ;
936943 const databases = Object . keys ( result ?. databases ?? { } ) . map ( ( db ) => parseIdent ( db ) ) ;
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ export async function fetchDatabaseList(namespace: string): Promise<NamespaceOrD
159159 const authDB = getAuthDB ( connection . authentication ) ;
160160
161161 if ( authDB ) {
162- return [ authDB ] ;
162+ return [ { name : authDB } ] ;
163163 }
164164
165165 const [ _ , result ] = await executeQuery (
You can’t perform that action at this time.
0 commit comments