mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 05:51:41 +00:00
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