Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: remove .replaceAll usage to support older Android 9 devices

Abdullah Atta6d2097259b6a
diff --git a/packages/editor/src/utils/font.ts b/packages/editor/src/utils/font.ts
index 12dee0ec4..8079003cd 100644
--- a/packages/editor/src/utils/font.ts
+++ b/packages/editor/src/utils/font.ts
@@ -56,9 +56,5 @@ export function getFontIds() {
}
function normalizeFontFamily(fontFamily: string) {
- return fontFamily
- .replace(/['"]+/g, "")
- .replaceAll(", ", ",")
- .replaceAll(",", "")
- .replace(/\s+/g, "");
+ return fontFamily.replace(/['",\s]+/g, "");
}