From 6434dac04d899ee1344c895d015da2a03adf71b6 Mon Sep 17 00:00:00 2001 From: Nasha Hiramiya Date: Thu, 30 Aug 2018 21:04:20 +0100 Subject: [PATCH] Add return for invalid filetypes, fixes wrong behaviour --- src/client/app/desktop/api/update-avatar.ts | 2 +- src/client/app/desktop/api/update-banner.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts index e9d92d1eb1..f08e8a2b4e 100644 --- a/src/client/app/desktop/api/update-avatar.ts +++ b/src/client/app/desktop/api/update-avatar.ts @@ -16,7 +16,7 @@ export default (os: OS) => { text: '%i18n:common.got-it%' }] }); - reject(); + return reject('invalid-filetype'); } const w = os.new(CropWindow, { diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts index e8fa35149b..42c9d69349 100644 --- a/src/client/app/desktop/api/update-banner.ts +++ b/src/client/app/desktop/api/update-banner.ts @@ -16,7 +16,7 @@ export default (os: OS) => { text: '%i18n:common.got-it%' }] }); - reject(); + return reject('invalid-filetype'); } const w = os.new(CropWindow, {