Skip to content

Commit

Permalink
No guards b/c kibana{Branch,Version} have defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Jul 30, 2020
1 parent 61abba4 commit 33a98da
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions x-pack/plugins/ingest_manager/server/services/app_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class AppContextService {
private configSubject$?: BehaviorSubject<IngestManagerConfigType>;
private savedObjects: SavedObjectsServiceStart | undefined;
private isProductionMode: IngestManagerAppContext['isProductionMode'] = false;
private kibanaVersion: IngestManagerAppContext['kibanaVersion'] | undefined = packageJSON.version;
private kibanaBranch: IngestManagerAppContext['kibanaBranch'] | undefined = packageJSON.branch;
private kibanaVersion: IngestManagerAppContext['kibanaVersion'] = packageJSON.version;
private kibanaBranch: IngestManagerAppContext['kibanaBranch'] = packageJSON.branch;
private cloud?: CloudSetup;
private logger: Logger | undefined;
private httpSetup?: HttpServiceSetup;
Expand Down Expand Up @@ -122,16 +122,10 @@ class AppContextService {
}

public getKibanaVersion() {
if (!this.kibanaVersion) {
throw new Error('Kibana version is not set.');
}
return this.kibanaVersion;
}

public getKibanaBranch() {
if (!this.kibanaBranch) {
throw new Error('Kibana branch is not set.');
}
return this.kibanaBranch;
}

Expand Down

0 comments on commit 33a98da

Please sign in to comment.