From 12e58ed05faf199d4cea75bef003d0906e9181c7 Mon Sep 17 00:00:00 2001 From: srksumanth Date: Mon, 1 Oct 2018 23:52:33 +0530 Subject: [PATCH] prevent accidental email update --- components/dashboard/profile/UpdateProfile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/dashboard/profile/UpdateProfile.js b/components/dashboard/profile/UpdateProfile.js index 3ad5ac1..d4393ff 100644 --- a/components/dashboard/profile/UpdateProfile.js +++ b/components/dashboard/profile/UpdateProfile.js @@ -48,7 +48,9 @@ class UpdateProfile extends Component { componentDidMount() { if (this.props.profile) { - this.setState({ ...this.state, ...this.props.profile }); + const profile = { ...this.props.profile }; + delete profile.email; + this.setState({ ...this.state, ...profile }); } this.fetchAllCities(); }