From 6f9ba3ac3750948107a07049a3801968890ff8cf Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 8 Mar 2019 07:40:55 +0000 Subject: [PATCH] fix broken test --- projects/adf-office-services-ext/src/lib/evaluators.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/adf-office-services-ext/src/lib/evaluators.ts b/projects/adf-office-services-ext/src/lib/evaluators.ts index 20cfe649c..9453ae1fc 100644 --- a/projects/adf-office-services-ext/src/lib/evaluators.ts +++ b/projects/adf-office-services-ext/src/lib/evaluators.ts @@ -6,8 +6,11 @@ export function canOpenWithOffice( context: RuleContext, ...args: RuleParameter[] ): boolean { - const { url } = context.navigation; - if (url && url.startsWith('/trashcan')) { + if ( + context.navigation && + context.navigation.url && + context.navigation.url.startsWith('/trashcan') + ) { return false; }