Set note ref to instance of Note when creating a new note
authorAdam Dullage <redacted>
Fri, 3 May 2024 09:25:30 +0000 (10:25 +0100)
committerAdam Dullage <redacted>
Fri, 3 May 2024 09:25:30 +0000 (10:25 +0100)
client/views/Note.vue

index 78aa91932e1fa8443404f257c8e34f1a4abb9a27..fb6a0307e9e222ee01cf84f5a0f461309a0fdec8 100644 (file)
@@ -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();
   }
 }
 
git clone https://git.99rst.org/PROJECT