Skip to content

Commit

Permalink
Pass entire link value and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Aug 29, 2023
1 parent 58f5e9a commit f71fc3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions packages/block-editor/src/components/link-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,7 @@ function LinkControl( {
settings={ settings?.filter(
( { id } ) => id === 'opensInNewTab'
) }
onChange={ ( { opensInNewTab } ) => {
onChange( {
opensInNewTab,
} );
} }
onChange={ onChange }
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1789,6 +1789,7 @@ describe( 'Addition Settings UI', () => {

expect( mockOnChange ).toHaveBeenCalledTimes( 1 );
expect( mockOnChange ).toHaveBeenCalledWith( {
...selectedLink,
opensInNewTab: true,
} );
} );
Expand Down

0 comments on commit f71fc3c

Please sign in to comment.