Skip to content

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

fix: handle editor crash due to content being undefined

thecodrr8285893bad0c
diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.js
index 70fc126c9..6673dee46 100644
--- a/apps/web/src/components/editor/index.js
+++ b/apps/web/src/components/editor/index.js
@@ -161,6 +161,7 @@ function Editor({ noteId, nonce }) {
onFocus={() => toggleProperties(false)}
onSave={saveSession}
onChange={(content) => {
+ if (!content) return;
if (!content.length) content = "<p><br></pr>";
setSession((state) => {
state.session.content = {