From 982ed3939d2746fe62b2ae8d864087beba942c7a Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Fri, 20 Aug 2021 14:49:13 +0200 Subject: [PATCH] Update x-pack/plugins/reporting/server/routes/deprecations.ts Co-authored-by: Michael Dokolin --- x-pack/plugins/reporting/server/routes/deprecations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/reporting/server/routes/deprecations.ts b/x-pack/plugins/reporting/server/routes/deprecations.ts index 7563187236cc27..874885e2258ae6 100644 --- a/x-pack/plugins/reporting/server/routes/deprecations.ts +++ b/x-pack/plugins/reporting/server/routes/deprecations.ts @@ -22,7 +22,7 @@ export const registerDeprecationsRoutes = (reporting: ReportingCore, logger: Log const authzWrapper = (handler: RequestHandler): RequestHandler => { return async (ctx, req, res) => { const { security } = reporting.getPluginSetupDeps(); - if (!security || !security.license.isEnabled()) { + if (!security?.license.isEnabled()) { return handler(ctx, req, res); }