Add missing reference to 'parent'.
authorAdam Dullage <redacted>
Thu, 8 Feb 2024 15:01:58 +0000 (15:01 +0000)
committerAdam Dullage <redacted>
Thu, 8 Feb 2024 15:01:58 +0000 (15:01 +0000)
client/components/NoteViewerEditor.vue

index fb3f99751f8b48c3b9a70952e799617fffbedc69..2bbe6b048858f9b671a5c0aebac10462db6dd862 100644 (file)
@@ -585,6 +585,8 @@ export default {
     },
 
     postAttachment(file) {
+      let parent = this;
+
       if (reservedFilenameCharacters.test(file.name)) {
         this.badFilenameToast("filename");
         return;
@@ -612,7 +614,7 @@ export default {
               "An attachment with this filename already exists ✘"
             );
           } else if (error.response?.status == 413) {
-            this.entityTooLargeToast("Attachment");
+            parent.entityTooLargeToast("Attachment");
           } else {
             EventBus.$emit(
               "showToast",
git clone https://git.99rst.org/PROJECT