From 22ab56a5925966e0115b0d6257158cafc22ec160 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 9 Jan 2015 15:38:39 +0100 Subject: [PATCH] Fix js error in personal settings if there is no password field --- settings/js/personal.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/settings/js/personal.js b/settings/js/personal.js index fba4af1fd48..0cf0cd81a7b 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -168,7 +168,9 @@ function avatarResponseHandler (data) { } $(document).ready(function () { - $('#pass2').showPassword().keyup(); + if($('#pass2').length) { + $('#pass2').showPassword().keyup(); + } $("#passwordbutton").click(function () { if ($('#pass1').val() !== '' && $('#pass2').val() !== '') { // Serialize the data