Merge pull request #2969 from matrix-org/optional_email_not_optional_2
Fix bug where email was not required where it shouldn't have beenpull/21833/head
						commit
						7933b43ebd
					
				|  | @ -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. | ||||
|  | @ -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 goes 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
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 David Baker
						David Baker