We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c1456a commit b59c48eCopy full SHA for b59c48e
1 file changed
packages/block-library/src/post-template/edit.js
@@ -2,6 +2,7 @@
2
* External dependencies
3
*/
4
import clsx from 'clsx';
5
+import fastDeepEqual from 'fast-deep-equal/es6/index.js';
6
7
/**
8
* WordPress dependencies
@@ -296,9 +297,10 @@ export default function PostTemplateEdit( {
296
297
return;
298
}
299
- const hasLayoutChanged =
300
- JSON.stringify( previousLayoutRef.current ) !==
301
- JSON.stringify( layout );
+ const hasLayoutChanged = ! fastDeepEqual(
+ previousLayoutRef.current,
302
+ layout
303
+ );
304
305
if (
306
hasLayoutChanged &&
0 commit comments