Skip to content

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

fix: pressing undo in a new note restores the previous note (#147)

thecodrrc6f07d48f5e2
diff --git a/apps/web/src/components/editor/react-quill.js b/apps/web/src/components/editor/react-quill.js
index 9bdc31dce..6084adcd0 100644
--- a/apps/web/src/components/editor/react-quill.js
+++ b/apps/web/src/components/editor/react-quill.js
@@ -68,6 +68,7 @@ export default class ReactQuill extends Component {
const { initialContent, refresh } = this.props;
if (refresh) {
this.quill.setContents(initialContent);
+ this.quill.history.clear();
if (!initialContent.ops || !initialContent.ops.length) return;
const text = this.quill.getText();
this.quill.setSelection(text.length, 0);