X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/58cadce052f5cc3c9ce2bc12f88a93cac310699a..refs/pull/4955/head:/resources/js/wysiwyg/drop-paste-handling.js diff --git a/resources/js/wysiwyg/drop-paste-handling.js b/resources/js/wysiwyg/drop-paste-handling.js index 33078cd1d..9668692c8 100644 --- a/resources/js/wysiwyg/drop-paste-handling.js +++ b/resources/js/wysiwyg/drop-paste-handling.js @@ -61,7 +61,7 @@ function paste(editor, options, event) { editor.dom.replace(newEl, id); }).catch(err => { editor.dom.remove(id); - window.$events.emit('error', options.translations.imageUploadErrorText); + window.$events.error(err?.data?.message || options.translations.imageUploadErrorText); console.error(err); }); }, 10);