fix missing yield in createAccount

This commit is contained in:
Dan Mills 2009-03-27 00:56:38 -07:00
Родитель c003e7c4b6
Коммит d278cedf1b
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -566,6 +566,8 @@ WeaveSvc.prototype = {
createAccount: function WeaveSvc_createAccount(onComplete, username, password, email,
captchaChallenge, captchaResponse) {
let fn = function WeaveSvc__createAccount() {
let self = yield;
function enc(x) encodeURIComponent(x);
let message = "uid=" + enc(username) + "&password=" + enc(password) +
"&mail=" + enc(email) +
@ -582,7 +584,9 @@ WeaveSvc.prototype = {
let resp;
try {
resp = yield res.post(self.cb, message);
} catch (e) {}
} catch (e) {
this._log.trace("Create account error: " + e);
}
if (res.lastChannel.responseStatus != 200 &&
res.lastChannel.responseStatus != 201)