From f97a11680b3df8434331f550cad0035ec571a54e Mon Sep 17 00:00:00 2001 From: LeonardJouve <81326532+LeonardJouve@users.noreply.github.com> Date: Mon, 3 Apr 2023 22:04:18 +0200 Subject: [PATCH] Fix add bot error handling (#22649) Co-authored-by: Mattermost Build --- .../src/components/integrations/bots/add_bot/add_bot.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/channels/src/components/integrations/bots/add_bot/add_bot.tsx b/webapp/channels/src/components/integrations/bots/add_bot/add_bot.tsx index 55bb0b9126..5dae1cbf73 100644 --- a/webapp/channels/src/components/integrations/bots/add_bot/add_bot.tsx +++ b/webapp/channels/src/components/integrations/bots/add_bot/add_bot.tsx @@ -249,6 +249,7 @@ export default class AddBot extends React.PureComponent { /> ), }); + return; } else if (this.state.pictureFile.size > this.props.maxFileSize) { this.setState({ error: ( @@ -258,6 +259,7 @@ export default class AddBot extends React.PureComponent { /> ), }); + return; } }