From 288c3b863ddf9a4220f7b6988d603040cbf51a97 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 13 May 2013 18:30:56 +0000 Subject: [PATCH] Fixed that JS warning is not displayed when attachment maximum size is 0 (#13949). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11841 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/attachments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 260c060e4..5876800a6 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -141,7 +141,7 @@ function uploadAndAttachFiles(files, inputEl) { var sizeExceeded = false; $.each(files, function() { - if (this.size && maxFileSize && this.size > parseInt(maxFileSize)) {sizeExceeded=true;} + if (this.size && maxFileSize != null && this.size > parseInt(maxFileSize)) {sizeExceeded=true;} }); if (sizeExceeded) { window.alert(maxFileSizeExceeded); -- 2.39.5