r9840 - apps/modules/trunk/core

[email protected] Mon, 6 Jul 2009 14:32:09 +0200 (CEST)
Newsgroups gmane.comp.java.helma.cvs
Message-ID <20090706123209.F31A33D0E3@mia>
Author: hannes
Date: 2009-07-06 14:32:09 +0200 (Mon, 06 Jul 2009)
New Revision: 9840

Modified:
   apps/modules/trunk/core/HopObject.js
Log:
Fix bug 661 - comparison bug in loop macro in HopObject.js

Details at http://dev.helma.org/trac/helma/changeset/9840

Modified: apps/modules/trunk/core/HopObject.js
===================================================================
--- apps/modules/trunk/core/HopObject.js	2009-07-02 12:49:44 UTC (rev 9839)
+++ apps/modules/trunk/core/HopObject.js	2009-07-06 12:32:09 UTC (rev 9840)
@@ -136,7 +136,7 @@
     if (param.sort) {
         var allitems = items.list();
         var test = allitems[0][param.sort];
-        if (!test || isNaN(test)) {
+        if (test == null || isNaN(test)) {
             var Sorter = String.Sorter;
         } else {
             var Sorter = Number.Sorter;