diff --git a/shared/editor/commands/insertFiles.ts b/shared/editor/commands/insertFiles.ts index 21814e07b..94e4427dd 100644 --- a/shared/editor/commands/insertFiles.ts +++ b/shared/editor/commands/insertFiles.ts @@ -146,8 +146,8 @@ const insertFiles = function ( } }; - newImg.onerror = (event) => { - throw new Error(`Error loading image: ${event}`); + newImg.onerror = () => { + throw new Error(`Error loading image: ${src}`); }; newImg.src = src;