Skip to content

Commit

Permalink
Fix toggle active font logic (WordPress#62614)
Browse files Browse the repository at this point in the history
* fix toggle active font logic

* simplify logic

Co-authored-by: matiasbenedetto <mmaattiiaass@git.wordpress.org>
Co-authored-by: madhusudhand <madhudollu@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>
Co-authored-by: nith53 <nithins53@git.wordpress.org>
  • Loading branch information
5 people authored and huubl committed Jun 17, 2024
1 parent e3187f4 commit 1d2bc82
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,13 @@ function FontLibraryProvider( { children } ) {
);

if ( isFaceActivated ) {
unloadFontFaceInBrowser( face, 'all' );
} else {
loadFontFaceInBrowser(
face,
getDisplaySrcFromFontFace( face?.src ),
'all'
);
} else {
unloadFontFaceInBrowser( face, 'all' );
}
};

Expand Down

0 comments on commit 1d2bc82

Please sign in to comment.