From ba3b76f769455908eca9f6f59584d18e2bd19f0e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 15 Feb 2021 19:23:01 -0800 Subject: [PATCH] fix: fix error message on media upload (#1959) --- src/routes/_actions/media.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/_actions/media.js b/src/routes/_actions/media.js index 5b4beddd..9a87696a 100644 --- a/src/routes/_actions/media.js +++ b/src/routes/_actions/media.js @@ -3,6 +3,7 @@ import { uploadMedia } from '../_api/media' import { toast } from '../_components/toast/toast' import { scheduleIdleTask } from '../_utils/scheduleIdleTask' import { setCachedMediaFile } from '../_utils/mediaUploadFileCache' +import { formatIntl } from '../_utils/formatIntl' export async function doMediaUpload (realm, file) { const { currentInstance, accessToken } = store.get() @@ -25,7 +26,7 @@ export async function doMediaUpload (realm, file) { scheduleIdleTask(() => store.save()) } catch (e) { console.error(e) - /* no await */ toast.say('intl.failedToUploadMedia', { error: (e.message || '') }) + /* no await */ toast.say(formatIntl('intl.failedToUploadMedia', { error: (e.message || '') })) } finally { store.set({ uploadingMedia: false }) }