Skip to content

Commit

Permalink
using firefox and fxios to detect firefox browser user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenedetto committed Feb 14, 2024
1 parent 8abd359 commit f85650a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function formatFontFaceName( input ) {
output = output.replace( /^["']|["']$/g, '' );

// Firefox needs the font name to be wrapped in double quotes meanwhile other browsers don't.
if ( window.navigator.userAgent.toLowerCase().includes( 'gecko' ) ) {
if ( window.navigator.userAgent.toLowerCase().match( /firefox|fxios/i ) ) {
output = `"${ output }"`;
}
return output;
Expand Down

0 comments on commit f85650a

Please sign in to comment.