Comparing version 2.14.1 to 2.14.2
@@ -72,3 +72,2 @@ | ||
this.ctxStorage = new AsyncLocalStorage(); | ||
this.use(this.createAsyncCtxStorageMiddleware()); | ||
} | ||
@@ -158,3 +157,8 @@ } | ||
const ctx = this.createContext(req, res); | ||
return this.handleRequest(ctx, fn); | ||
if (!this.ctxStorage) { | ||
return this.handleRequest(ctx, fn); | ||
} | ||
return this.ctxStorage.run(ctx, async() => { | ||
return await this.handleRequest(ctx, fn); | ||
}); | ||
}; | ||
@@ -161,0 +165,0 @@ |
{ | ||
"name": "koa", | ||
"version": "2.14.1", | ||
"version": "2.14.2", | ||
"description": "Koa web app framework", | ||
@@ -5,0 +5,0 @@ "main": "lib/application.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1617
61113
8