Skip to content

Commit

Permalink
Use replaceAll where only first space was being replaced (#3111)
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored May 6, 2024
1 parent b378db8 commit 4e459a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utilities/fontCssUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function fetchCss(
let cssUrl = "";
switch (source) {
case "local":
cssUrl = `${fontDir}/${font.replace(" ", "")}.css`;
cssUrl = `${fontDir}/${font.replaceAll(" ", "")}.css`;
break;
case "google":
cssUrl = `https://fonts.googleapis.com/css?dispay=swap&family=${font}`;
Expand Down

0 comments on commit 4e459a5

Please sign in to comment.