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; }