X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ff46d81681eead543d397cbb1de33ad07a4cb94f..refs/pull/2877/head:/resources/js/components/page-editor.js diff --git a/resources/js/components/page-editor.js b/resources/js/components/page-editor.js index 266e19182..e753b58e1 100644 --- a/resources/js/components/page-editor.js +++ b/resources/js/components/page-editor.js @@ -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 {