Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix bug where email was not required where it shouldn't have been
Browse files Browse the repository at this point in the history
See comment!

Fixes element-hq/element-web#9681
  • Loading branch information
dbkr committed May 13, 2019
1 parent 86ae9d9 commit 34990d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/views/auth/RegistrationForm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
Copyright 2018 New Vector Ltd
Copyright 2018, 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -150,7 +150,11 @@ module.exports = React.createClass({
if (!field) {
continue;
}
field.validate({ allowEmpty: false });
// We must wait for these validations to finish before queueing
// up the setState below so our setState gies in the queue after
// all the setStates from these validate calls (that's how we
// know they've finished).
await field.validate({ allowEmpty: false });
}

// Validation and state updates are async, so we need to wait for them to complete
Expand Down

0 comments on commit 34990d1

Please sign in to comment.