From b082aaa0112ab5295a9447d1aa16a72794782ccd Mon Sep 17 00:00:00 2001 From: Thomas Hunter Date: Thu, 18 Aug 2022 16:32:54 +0100 Subject: [PATCH] [ACS-3441] Fix aos plugin not detected on app deploy, failing e2e tests (#2600) --- .../src/lib/aos-extension.module.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/projects/adf-office-services-ext/src/lib/aos-extension.module.ts b/projects/adf-office-services-ext/src/lib/aos-extension.module.ts index 18caf6dab..7518bc38f 100644 --- a/projects/adf-office-services-ext/src/lib/aos-extension.module.ts +++ b/projects/adf-office-services-ext/src/lib/aos-extension.module.ts @@ -38,14 +38,8 @@ import { canOpenWithOffice } from './evaluators'; export class AosExtensionModule { constructor(extensions: ExtensionService, translation: TranslationService, aosService: AlfrescoOfficeExtensionService) { translation.addTranslationFolder('adf-office-services-ext', 'assets/adf-office-services-ext'); - if (!aosService.isAosPluginEnabled()) { - extensions.setEvaluators({ - 'aos.canOpenWithOffice': () => false - }); - } else { - extensions.setEvaluators({ - 'aos.canOpenWithOffice': canOpenWithOffice - }); - } + extensions.setEvaluators({ + 'aos.canOpenWithOffice': (context) => aosService.isAosPluginEnabled() && canOpenWithOffice(context) + }); } }