diff --git a/src/index.ts b/src/index.ts index d888426..e67d460 100644 --- a/src/index.ts +++ b/src/index.ts @@ -402,7 +402,7 @@ export class UnleashClient extends TinyEmitter { return this.readyEventEmitted; } - public getError(): SdkState { + public getError() { return this.sdkState === 'error' ? this.lastError : undefined; }