Skip to content

Commit

Permalink
Use replaceAll where only first space was being replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed May 3, 2024
1 parent 29a699d commit 0839ea5
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 0839ea5

Please sign in to comment.