Skip to content

Commit 047167c

Browse files
committed
Don't save falsy value
1 parent ff9b63a commit 047167c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/block-editor/src/hooks/anchor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function BlockEditAnchorControlPure( { anchor, setAttributes } ) {
8686
onChange={ ( nextValue ) => {
8787
nextValue = nextValue.replace( ANCHOR_REGEX, '-' );
8888
setAttributes( {
89-
anchor: nextValue,
89+
anchor: nextValue !== '' ? nextValue : undefined,
9090
} );
9191
} }
9292
autoCapitalize="none"

0 commit comments

Comments
 (0)