From cf32d227e692db705d4a1fcc07bbdd1537805e3c Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 8 Jul 2023 13:57:25 -0400 Subject: [PATCH] fix: Error loading image: [object Event] --- shared/editor/commands/insertFiles.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;