From 85f0c71d82558aca1455a6df8a51c3f32a18878e Mon Sep 17 00:00:00 2001 From: Declan Cook Date: Mon, 17 Mar 2014 00:20:01 +0000 Subject: [PATCH] Fix scoping issue on signup closes #2429 --- ghost/admin/views/login.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghost/admin/views/login.js b/ghost/admin/views/login.js index d4a8886d57..24e5f9cc77 100644 --- a/ghost/admin/views/login.js +++ b/ghost/admin/views/login.js @@ -94,7 +94,8 @@ var name = this.$('.name').val(), email = this.$('.email').val(), password = this.$('.password').val(), - validationErrors = []; + validationErrors = [], + self = this; if (!validator.isLength(name, 1)) { validationErrors.push("Please enter a name."); @@ -131,7 +132,7 @@ window.location.href = msg.redirect; }, error: function (xhr) { - this.submitted = "no"; + self.submitted = "no"; Ghost.notifications.clearEverything(); Ghost.notifications.addItem({ type: 'error',