Skip to content

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

fix: cannot read property "startsWith" of undefined

thecodrrda730ffb4b4f
diff --git a/packages/editor/src/utils/downloader.ts b/packages/editor/src/utils/downloader.ts
index 82cfcb1d0..186f53231 100644
--- a/packages/editor/src/utils/downloader.ts
+++ b/packages/editor/src/utils/downloader.ts
@@ -33,8 +33,8 @@ export function toDataURL(blob: Blob): Promise<string> {
});
}
-export function isDataUrl(url: string): boolean {
- return url.startsWith("data:");
+export function isDataUrl(url?: string): boolean {
+ return url?.startsWith("data:") || false;
}
export async function toBlobURL(dataurl: string) {