mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): ignore actions from other slices in nodesSlice history
This commit is contained in:
@ -651,6 +651,10 @@ export const nodesUndoableConfig: UndoableOptions<NodesState, UnknownAction> = {
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
filter: (action, _state, _history) => {
|
filter: (action, _state, _history) => {
|
||||||
|
// Ignore all actions from other slices
|
||||||
|
if (!action.type.startsWith(nodesSlice.name)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (nodesChanged.match(action)) {
|
if (nodesChanged.match(action)) {
|
||||||
if (action.payload.every((change) => change.type === 'dimensions')) {
|
if (action.payload.every((change) => change.type === 'dimensions')) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user