]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/page-editor.js
Typo.
[bookstack] / resources / js / components / page-editor.js
index 266e1918251d805fe4bc6735e5b3f801212fc2a6..e753b58e18309879e3ddfbfdfa5ec78702830e8b 100644 (file)
@@ -12,7 +12,7 @@ class PageEditor {
         this.editorType = this.$opts.editorType;
         this.pageId = Number(this.$opts.pageId);
         this.isNewDraft = this.$opts.pageNewDraft === 'true';
-        this.hasDefaultTitle = this.$opts.isDefaultTitle || false;
+        this.hasDefaultTitle = this.$opts.hasDefaultTitle || false;
 
         // Elements
         this.container = this.$el;
@@ -119,6 +119,9 @@ class PageEditor {
             }
             this.draftNotifyChange(`${resp.data.message} ${Dates.utcTimeStampToLocalTime(resp.data.timestamp)}`);
             this.autoSave.last = Date.now();
+            if (resp.data.warning.length > 0) {
+                window.$events.emit('warning', resp.data.warning);
+            }
         } catch (err) {
             // Save the editor content in LocalStorage as a last resort, just in case.
             try {