fix(ui): ignore actions from other slices in nodesSlice history

This commit is contained in:
psychedelicious 2024-05-17 12:16:13 +10:00
parent dd42a56084
commit d2f5103f9f

View File

@ -651,6 +651,10 @@ export const nodesUndoableConfig: UndoableOptions<NodesState, UnknownAction> = {
return null;
},
filter: (action, _state, _history) => {
// Ignore all actions from other slices
if (!action.type.startsWith(nodesSlice.name)) {
return false;
}
if (nodesChanged.match(action)) {
if (action.payload.every((change) => change.type === 'dimensions')) {
return false;