Skip to content

Commit

Permalink
Fixed bug with undo.
Browse files Browse the repository at this point in the history
  • Loading branch information
DawidKossowski committed Nov 17, 2023
1 parent 2c7cc50 commit dbea7b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/useMultiRootEditor.tsx
Expand Up @@ -397,7 +397,9 @@ const useMultiRootEditor = ( props: MultiRootHookProps ): MultiRootHookReturns =
} = _getStateDiff( editorData, data || {} );

const hasModifiedData = dataKeys.some( rootName =>
JSON.stringify( editorData[ rootName ] ) !== JSON.stringify( data[ rootName ] ) );
editorData[ rootName ] !== undefined &&
JSON.stringify( editorData[ rootName ] ) !== JSON.stringify( data[ rootName ] )
);

const rootsWithChangedAttributes = attributesKeys.filter( rootName =>
JSON.stringify( editorAttributes[ rootName ] ) !== JSON.stringify( attributes[ rootName ] ) );
Expand Down

0 comments on commit dbea7b7

Please sign in to comment.