From 849f4f617b5d1da39104c946f261a2c4b56d29ec Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 20 Jul 2020 11:49:49 +0000 Subject: [PATCH] fix(core): update --- ts/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/index.ts b/ts/index.ts index ba99a36..78422c2 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -13,6 +13,10 @@ export class SmartCls { public get(keyArg: string) { const store: any = this.asyncLocalStorage.getStore(); - return store[keyArg]; + if (store) { + return store[keyArg]; + } else { + return undefined; + } } }