]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/page-editor.js
Typo.
[bookstack] / resources / js / components / page-editor.js
index a0d8d38b129b3c4c8d4c8fde8eeb4f51e4a3f4a8..e753b58e18309879e3ddfbfdfa5ec78702830e8b 100644 (file)
@@ -74,7 +74,6 @@ class PageEditor {
     }
 
     setInitialFocus() {
-        console.log({'HAS': this.hasDefaultTitle});
         if (this.hasDefaultTitle) {
             return this.titleElem.select();
         }
@@ -120,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 {