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 3928e26eaa858f654593911cc11f06c73ac67db2..1bf746f2d00f83405093920ba008781896086f35 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'); }