Merged in iss84 (pull request #46) Не проверять файлы, если поля аттача нет; Fixes #84

This commit is contained in:
Alexey Skobkin 2015-02-08 19:03:11 +03:00
commit 2a0546fd65
1 changed files with 6 additions and 2 deletions

View File

@ -95,9 +95,13 @@ AjaxComments.prototype.isProperKeys = function(event) {
* @return {Boolean} Выбран ли файл
*/
AjaxComments.prototype.isFileSelected = function($form) {
var files = $form.get(0).elements.attach.files;
var attach = $form.get(0).elements.attach;
return Boolean(files && files.length);
if (attach) {
return Boolean(attach.files && attach.files.length);
} else {
return false;
}
};
/**