Skip to content

Commit

Permalink
Account for link anchor no longer being present (#36357)
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored Nov 10, 2021
1 parent 2918b80 commit 39fe346
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/format-library/src/link/use-link-instance-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ function getKey( _id ) {
* @return {string} the unique key to use for this link control.
*/
function useLinkInstanceKey( instance ) {
if ( ! instance ) {
return;
}
if ( weakMap.has( instance ) ) {
return getKey( weakMap.get( instance ) );
}
Expand Down

0 comments on commit 39fe346

Please sign in to comment.