details:   https://code.openbravo.com/erp/devel/pi/rev/095c84839a3e
changeset: 29243:095c84839a3e
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Tue Apr 19 10:28:30 2016 +0200
summary:   Fixed issue 32705.check that attachmentCount is a number

Change the if clause to check that attachmentCount is a number instead of just
if (data.attachmentCount) {}.
In this case when count is 0 the if clause should return true but JavaScript
considers 0 as false.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
 |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r de209c96bd10 -r 095c84839a3e 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Mon Apr 18 10:14:52 2016 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Tue Apr 19 10:28:30 2016 +0200
@@ -851,7 +851,7 @@
       if (data.attachments) {
         this.attachmentsSection.fillAttachments(data.attachments);
       }
-      if (data.attachmentCount) {
+      if (isc.isA.Number(data.attachmentCount)) {
         this.attachmentsSection.setAttachmentCount(data.attachmentCount);
       }
     }

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to