Skip to content

Commit ce74a66

Browse files
committed
Update lastURLRef within the useEffect as a safeguard
1 parent 60068c1 commit ce74a66

File tree

1 file changed

+1
-0
lines changed
  • packages/block-library/src/navigation-link/shared

1 file changed

+1
-0
lines changed

packages/block-library/src/navigation-link/shared/controls.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export function Controls( { attributes, setAttributes, clientId } ) {
8383
// Sync local state when url prop changes (e.g., from undo/redo or external updates)
8484
useEffect( () => {
8585
setInputValue( url );
86+
lastURLRef.current = url;
8687
}, [ url ] );
8788

8889
// Use the entity binding hook internally

0 commit comments

Comments
 (0)