Commit 6b86e1cf authored by Michal Čihař's avatar Michal Čihař

Do not try to submit nonexisting button

Fixes rb#202
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 696a7184
......@@ -55,7 +55,10 @@ function submitForm(evt) {
$form = $('.translation-form');
}
if ($form.length > 0) {
$form.find('input[type="submit"]')[0].click();
var submits = $form.find('input[type="submit"]');
if (submits.length > 0) {
submits[0].click();
}
}
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment