Skip to content

Commit

Permalink
fix (posts): use uniqueId as stkQueryId to ensure uniqueness even whe…
Browse files Browse the repository at this point in the history
…n… (#3289)

* 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
  • Loading branch information
Arukuen authored Sep 5, 2024
1 parent 99e9d35 commit 0ae9cfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/block/posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] )
Expand Down

0 comments on commit 0ae9cfe

Please sign in to comment.