diff --git a/package.json b/package.json index 315d511..579b7f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@unleash/proxy", - "version": "1.0.0", + "version": "1.0.1", "description": "The Unleash Proxy (Open-Source)", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/context-middleware.ts b/src/context-middleware.ts index a2f624a..24e03e2 100644 --- a/src/context-middleware.ts +++ b/src/context-middleware.ts @@ -8,7 +8,7 @@ const GET = 'GET'; export const createContexMiddleware: Function = (contextEnrichers: ContextEnricher[]) => async (req: Request, res: Response, next: NextFunction) => { - let context; + let context: any = {}; if (req.method === GET) { context = req.query || {}; } else if (req.method === POST) {