Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update doc string
  • Loading branch information
talldan committed Feb 29, 2024
commit 5e7c6503f736faaab56f2617859d4773ebff2e55
6 changes: 3 additions & 3 deletions packages/patterns/src/components/use-set-pattern-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function useSetPatternBindings(

useEffect( () => {
// Bindings should only be created when editing a wp_block post type,
// and also when there's a change to the user given name for the block.
// and also when there's a change to the user-given name for the block.
if (
currentPostType !== 'wp_block' ||
metadataName === prevMetadataName
Expand All @@ -70,7 +70,7 @@ export default function useSetPatternBindings(
return;
}

// The user given name for the block was deleted, remove the bindings.
// The user-given name for the block was deleted, remove the bindings.
if ( ! metadataName?.length && prevMetadataName?.length ) {
const updatedBindings = removeBindings(
bindings,
Expand All @@ -84,7 +84,7 @@ export default function useSetPatternBindings(
} );
}

// The user given name for the block was set, set the bindings.
// The user-given name for the block was set, set the bindings.
if ( ! prevMetadataName?.length && metadataName.length ) {
const updatedBindings = addBindings( bindings, syncedAttributes );
setAttributes( {
Expand Down