File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export class AtelierAPI {
4343 public readonly wsOrFile ?: string | vscode . Uri ;
4444
4545 public get ns ( ) : string {
46- return ( this . namespace || this . _config . ns ) . toUpperCase ( ) ;
46+ return ( this . namespace || this . _config . ns || "" ) . toUpperCase ( ) ;
4747 }
4848
4949 public get config ( ) : ConnectionSettings {
@@ -340,16 +340,12 @@ export class AtelierAPI {
340340 }
341341 }
342342
343- /**
344- * Use the serverInfo endpoint. Connection object does not need to have specified a namespace when instantiated.
345- */
346343 public serverInfo ( ) : Promise < Atelier . Response < Atelier . Content < Atelier . ServerInfo > > > {
347344 return this . request ( 0 , "GET" ) . then ( ( info ) => {
348345 if ( info && info . result && info . result . content && info . result . content . api > 0 ) {
349346 const data = info . result . content ;
350347 const apiVersion = data . api ;
351- // If this is a namespace-specific connection, throw if it doesn't exist or if the user has no access to it
352- if ( this . ns && ! data . namespaces . includes ( this . ns . toUpperCase ( ) ) ) {
348+ if ( ! data . namespaces . includes ( this . ns ) ) {
353349 throw {
354350 code : "WrongNamespace" ,
355351 message : `This server does not have specified namespace '${ this . ns } '.\n
You can’t perform that action at this time.
0 commit comments