File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,16 @@ export class KomodoApi {
2525 constructor ( logger ?: Logger , options ?: KomodoApiOptions ) {
2626 this . logger = childLogger ( logger ?? initLogger ( ) [ 0 ] , 'Komodo API' ) ;
2727 this . options = options ;
28- this . urlData = normalizeWebAddress ( process . env . KOMODO_URL ) ;
28+ if ( process . env . KOMODO_URL !== undefined ) {
29+ this . urlData = normalizeWebAddress ( process . env . KOMODO_URL ) ;
30+ }
2931 }
3032
3133 init = ( ) => {
3234 if ( this . api === undefined ) {
35+ if ( isUndefinedOrEmptyString ( process . env . KOMODO_URL ) ) {
36+ throw new SimpleError ( `Cannot use Komodo API because env KOMODO_URL is missing` ) ;
37+ }
3338 if ( isUndefinedOrEmptyString ( process . env . API_KEY ) ) {
3439 throw new SimpleError ( `Cannot use Komodo API because env API_KEY is missing` ) ;
3540 }
You can’t perform that action at this time.
0 commit comments