diff app/controller/Filter.js @ 1124:a4944b52176e

Fixed selecting item on undefined attribute.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 24 May 2016 10:39:43 +0200
parents 0b908138a740
children 056ffbc2790a
line wrap: on
line diff
--- a/app/controller/Filter.js	Mon May 23 17:07:50 2016 +0200
+++ b/app/controller/Filter.js	Tue May 24 10:39:43 2016 +0200
@@ -111,7 +111,9 @@
         contentPanel.removeAll(); //clear the panel: make space for new grids
 
         // Setup Columns
-        if (this.displayFields && this.displayFields[0].index === 0) {
+        if (this.displayFields &&
+            this.displayFields.length > 0 &&
+            this.displayFields[0].index === 0) {
             this.displayFields.reverse();
         }
 

http://lada.wald.intevation.org