From 396131458a8d05509d35ed708a084a308916158e Mon Sep 17 00:00:00 2001 From: xinking129 Date: Thu, 10 Aug 2023 14:44:20 +0800 Subject: [PATCH] fix code Signed-off-by: xinking129 --- .../src/main/ets/UIExtensionAbility/UIExtAbility.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ability/ability_runtime/actsactionextensionability/actsactionextensionabilityself/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts b/ability/ability_runtime/actsactionextensionability/actsactionextensionabilityself/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts index 3928e26ea..1bf746f2d 100644 --- a/ability/ability_runtime/actsactionextensionability/actsactionextensionabilityself/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts +++ b/ability/ability_runtime/actsactionextensionability/actsactionextensionabilityself/entry/src/main/ets/UIExtensionAbility/UIExtAbility.ts @@ -354,8 +354,9 @@ export default class UiExtAbility extends ActionExtensionAbility { } if (want.action === 'Acts_ActionExtensionAbility_3200') { + let moduleContext; try { - let moduleContext = this.context.createModuleContext('entry_assist'); + moduleContext = this.context.createModuleContext('entry_assist'); } catch { console.log('createModuleContext err'); } @@ -370,8 +371,9 @@ export default class UiExtAbility extends ActionExtensionAbility { } if (want.action === 'Acts_ActionExtensionAbility_3300') { + let moduleContext; try { - let moduleContext = this.context.createModuleContext('abc'); + moduleContext = this.context.createModuleContext('abc'); } catch { console.log('createModuleContext err'); } @@ -386,8 +388,9 @@ export default class UiExtAbility extends ActionExtensionAbility { } if (want.action === 'Acts_ActionExtensionAbility_3400') { + let moduleContext; try { - let moduleContext = this.context.createModuleContext(undefined); + moduleContext = this.context.createModuleContext(undefined); } catch { console.log('createModuleContext err'); } -- GitLab