editor: fallar cuando se intenta subir sin archivo
This commit is contained in:
parent
d5592fffb4
commit
8212c323ca
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ function createElementWithFile (url: string, type: string): HTMLElement {
|
|||
export function setupAuxiliaryToolbar (editor: Editor): void {
|
||||
editor.toolbar.auxiliary.multimedia.uploadEl.addEventListener('click', event => {
|
||||
const files = editor.toolbar.auxiliary.multimedia.fileEl.files
|
||||
if (!files) throw new Error('no hay archivos para subir')
|
||||
if (!files || !files.length) throw new Error('no hay archivos para subir')
|
||||
const file = files[0]
|
||||
|
||||
const selectedEl = editor.contentEl
|
||||
|
|
Loading…
Reference in a new issue