Skip to content

Commit

Permalink
fix: changed clearing actionParams on empty changed params
Browse files Browse the repository at this point in the history
  • Loading branch information
Marginy605 committed Dec 1, 2023
1 parent a6666b7 commit 0d0dd4e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/utils/update-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand Down

0 comments on commit 0d0dd4e

Please sign in to comment.