From 0ae9cfe6c7cfdd2cb8d8ec31e6abc432d4fede9e Mon Sep 17 00:00:00 2001 From: Alquen Antonio Sarmiento Date: Thu, 5 Sep 2024 14:48:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(posts):=20use=20uniqueId=20as=20stkQuery?= =?UTF-8?q?Id=20to=20ensure=20uniqueness=20even=20when=E2=80=A6=20(#3289)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(posts): use uniqueId as stkQueryId to ensure uniqueness even when duplicated * fix: change attribute type of stkQueryId * fix: revert uniqueId changes, implement simple condition to ensure uniqueness --- src/block/posts/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/block/posts/edit.js b/src/block/posts/edit.js index e257a9be8..6927b06f7 100644 --- a/src/block/posts/edit.js +++ b/src/block/posts/edit.js @@ -155,7 +155,7 @@ const Edit = props => { // Set a unique instance ID for the posts block. // This is used to give unique identifier to our // queries. - if ( ! stkQueryId ) { + if ( stkQueryId !== instanceId ) { setAttributes( { stkQueryId: instanceId } ) } }, [ stkQueryId, instanceId ] )