From 28d98f0c7a192e127f8d079cce96635f04129e3f Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 24 Feb 2016 15:46:39 -0300 Subject: Another variable test --- gmap_arcgis.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmap_arcgis.js b/gmap_arcgis.js index dc26742..55c6b71 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -436,7 +436,7 @@ function gmapArcgis(config) { // Toggle layer visibility toggleLayers: function(element) { - if (this.config['layers'][element].overlay != undefined && this.config['layers'][element].overlay.setVisible != undefined) { + if (this.config['layers'][element] != undefined && this.config['layers'][element].overlay != undefined && this.config['layers'][element].overlay.setVisible != undefined) { var changeTo = !this.config['layers'][element].overlay.getVisible(); this.config['layers'][element].overlay.setVisible(changeTo); } -- cgit v1.2.3