[Commits] r1332 - core/trunk/geoext/lib/GeoExt/widgets
commits at geoext.org
commits at geoext.org
Fri Aug 21 19:29:27 CEST 2009
Author: bartvde
Date: 2009-08-21 19:29:27 +0200 (Fri, 21 Aug 2009)
New Revision: 1332
Modified:
core/trunk/geoext/lib/GeoExt/widgets/LegendPanel.js
Log:
protect ourselves against this.items is undefined error in LegendPanel, r=tschaub (closes #145)
Modified: core/trunk/geoext/lib/GeoExt/widgets/LegendPanel.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/LegendPanel.js 2009-08-19 17:04:49 UTC (rev 1331)
+++ core/trunk/geoext/lib/GeoExt/widgets/LegendPanel.js 2009-08-21 17:29:27 UTC (rev 1332)
@@ -134,7 +134,7 @@
*/
onStoreUpdate: function(store, record, operation) {
var layer = record.get('layer');
- var legend = this.getComponent(layer.id);
+ var legend = this.items ? this.getComponent(layer.id) : null;
if ((this.showTitle && !record.get('hideTitle')) &&
(legend && legend.items.get(0).text !== record.get('title'))) {
// we need to update the title
More information about the Commits
mailing list