From 5cd9f49d79a59a235e6eaf8359be525cb064a619 Mon Sep 17 00:00:00 2001 From: jp-roisin <72938245+jp-roisin@users.noreply.github.com> Date: Mon, 4 Mar 2024 21:53:53 +0100 Subject: [PATCH] Fix depricated DomException code property --- src/apps/stable/routes/user/userprofile.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/stable/routes/user/userprofile.tsx b/src/apps/stable/routes/user/userprofile.tsx index bb0500da0f..c73760ade7 100644 --- a/src/apps/stable/routes/user/userprofile.tsx +++ b/src/apps/stable/routes/user/userprofile.tsx @@ -80,11 +80,11 @@ const UserProfile: FunctionComponent = () => { const onFileReaderError = (evt: ProgressEvent) => { loading.hide(); - switch (evt.target?.error?.code) { - case DOMException.NOT_FOUND_ERR: + switch (evt.target?.error?.name) { + case 'NotFoundError': toast(globalize.translate('FileNotFound')); break; - case DOMException.ABORT_ERR: + case 'AbortError': onFileReaderAbort(); break; default: