2 Commits

Author SHA1 Message Date
22762b8eec 1.0.9 2020-07-20 11:49:50 +00:00
849f4f617b fix(core): update 2020-07-20 11:49:49 +00:00
3 changed files with 7 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "smartcls", "name": "smartcls",
"version": "1.0.8", "version": "1.0.9",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartcls", "name": "@pushrocks/smartcls",
"version": "1.0.8", "version": "1.0.9",
"description": "continuation-local-storage using native AsyncLocalStorage", "description": "continuation-local-storage using native AsyncLocalStorage",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",

View File

@ -13,6 +13,10 @@ export class SmartCls {
public get(keyArg: string) { public get(keyArg: string) {
const store: any = this.asyncLocalStorage.getStore(); const store: any = this.asyncLocalStorage.getStore();
if (store) {
return store[keyArg]; return store[keyArg];
} else {
return undefined;
}
} }
} }