A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: do not use named regex groups
thecodrrc0c3a1f14dc3
diff --git a/packages/core/utils/dataurl.js b/packages/core/utils/dataurl.jsindex 8a94a945b..ea7152840 100644--- a/packages/core/utils/dataurl.js+++ b/packages/core/utils/dataurl.js@@ -1,8 +1,10 @@-const REGEX = /^data:(?<mime>image\/.+);base64,(?<data>.+)/;+const REGEX = /^data:(image\/.+);base64,(.+)/;function toObject(dataurl) {- const { groups } = REGEX.exec(dataurl);- return groups || {};+ const regexResult = REGEX.exec(dataurl);+ if (regexResult.length < 3) return {};+ const [_, mime, data] = regexResult;+ return { mime, data };}function fromObject({ type, data }) {