From 0089798f864852acebab973cac5abaa114feed36 Mon Sep 17 00:00:00 2001 From: isqua Date: Sun, 8 Feb 2015 16:58:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=8F=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B,=20?= =?UTF-8?q?=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BF=D0=BE=D0=BB=D1=8F=20=D0=B0?= =?UTF-8?q?=D1=82=D1=82=D0=B0=D1=87=D0=B0=20=D0=BD=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome_point_plus/modules/ajax-comments.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome_point_plus/modules/ajax-comments.js b/chrome_point_plus/modules/ajax-comments.js index 8e51d6a..c4c940c 100644 --- a/chrome_point_plus/modules/ajax-comments.js +++ b/chrome_point_plus/modules/ajax-comments.js @@ -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; + } }; /**