Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where auto-filled teacher application primary email was not being accepted #14170

Merged
merged 2 commits into from Apr 4, 2017

Conversation

aoby
Copy link
Contributor

@aoby aoby commented Apr 4, 2017

This fixes a bug introduced in #14124.

The initially-suggested primary email value is not recognized because it's not added to state, until edit:

screen shot 2017-04-04 at 11 03 32 am

Copy link
Contributor

@mehalshah mehalshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment then ship

@@ -133,6 +133,12 @@ const TeacherApplication = React.createClass({
},

getInitialState() {
if (this.props.accountEmail) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just do
return this.props.accountEmail ? {primaryEmail: This.props.accountEmail} : {}

@aoby aoby merged commit 19f92a4 into staging Apr 4, 2017
@aoby aoby deleted the teacher-application-email-bugfix branch April 4, 2017 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants