Skip to content

Commit

Permalink
Switch to using a const
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Feb 22, 2024
1 parent 10b4d70 commit eb5bc0f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/patterns/src/components/partial-syncing-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ export default function useSetPatternBindings(
return;
}

let updatedBindings;

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

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

0 comments on commit eb5bc0f

Please sign in to comment.