Fix error when unset user email (#1778)

This commit is contained in:
Marco Cheung
2016-05-14 01:51:01 +08:00
committed by Drew
parent 19e7407f55
commit d0c3535a39
2 changed files with 17 additions and 1 deletions

View File

@@ -356,7 +356,7 @@ RestWrite.prototype.transformUser = function() {
return Promise.resolve();
});
}).then(() => {
if (!this.data.email) {
if (!this.data.email || this.data.email.__op === 'Delete') {
return;
}
// Validate basic email address format