Skip to content
Snippets Groups Projects
Commit ed8ce287 authored by Diego Mello's avatar Diego Mello Committed by Guilherme Gazzo
Browse files

Fix for "java.lang.IllegalArgumentException: unexpected url" (#313)

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/ReactNative

<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
User was able to add an invalid instance of Rocket.Chat by pressing submit button instead of "Connect" button.

<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->
parent 3b278f47
No related branches found
No related tags found
No related merge requests found
......@@ -48,8 +48,10 @@ export default class NewServerView extends LoggedView {
}
submit = () => {
Keyboard.dismiss();
this.props.addServer(this.completeUrl(this.state.text));
if (this.props.validInstance) {
Keyboard.dismiss();
this.props.addServer(this.completeUrl(this.state.text));
}
}
completeUrl = (url) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment