diff --git a/src/utils/update-manager.ts b/src/utils/update-manager.ts index 4072165..a7c69eb 100644 --- a/src/utils/update-manager.ts +++ b/src/utils/update-manager.ts @@ -400,7 +400,14 @@ export class UpdateManager { ]?.params ? '$merge' : '$set'; - if (isTabSwitched) { + const initialedStateAndParams = + initiatorId in itemsStateAndParams && + (itemsStateAndParams as ItemsStateAndParamsBase)[initiatorId]; + const needResetCurrentAP = + initialedStateAndParams && + Object.keys(pickActionParamsFromParams(initialedStateAndParams.params)).length && + !Object.keys(allowableActionParams).length; + if (isTabSwitched || needResetCurrentAP) { commandUpdateParams = '$set'; }