Merge pull request #13196 from owncloud/js-personal-no-password

Fix js error in personal settings if there is no password field
This commit is contained in:
Robin Appelman 2015-01-09 16:45:32 +01:00
commit cd79b0279a
1 changed files with 3 additions and 1 deletions

View File

@ -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