Modified KibanaServerVersion to parse v5 and v6 status formats (#12878)

* Modified KibanaServerVersion to parse v5 and v6 status formats

* Furthering the war against lodash
This commit is contained in:
Brandon Kobel 2017-07-14 15:24:45 -04:00 committed by Spencer
parent e3932ee129
commit 89394b4490

View file

@ -10,6 +10,11 @@ export class KibanaServerVersion {
}
const status = await this.kibanaStatus.get();
if (status && status.version && typeof status.version === 'string') {
this._cachedVersionNumber = status.version;
return this._cachedVersionNumber;
}
if (status && status.version && status.version.number) {
this._cachedVersionNumber = status.version.number;
return this._cachedVersionNumber;