From: Adam Dullage Date: Fri, 3 May 2024 09:25:30 +0000 (+0100) Subject: Set note ref to instance of Note when creating a new note X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=b85f19ca01c929a51e57ca3f83908124eee320c8;p=flatnotes.git Set note ref to instance of Note when creating a new note --- diff --git a/client/views/Note.vue b/client/views/Note.vue index 78aa919..fb6a030 100644 --- a/client/views/Note.vue +++ b/client/views/Note.vue @@ -65,6 +65,7 @@ import { deleteNote, getNote } from "../api.js"; import ConfirmModal from "../components/ConfirmModal.vue"; import CustomButton from "../components/CustomButton.vue"; import { getUnknownServerErrorToastOptions } from "../helpers.js"; +import { Note } from "../classes.js"; const props = defineProps({ title: String, @@ -89,7 +90,7 @@ function init() { }); } else { editMode.value = true; - note.value = {}; + note.value = new Note(); } }