aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gmap_arcgis.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index e58bae4..9a9b4db 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -109,8 +109,10 @@ function gmapArcgis(config) {
}
}
- // Callback
- params.identify.callback(layers, params.infowindow, err);
+ // Callback only if layers is not empty
+ if (layers.toSource() !== "({})") {
+ params.identify.callback(layers, params.infowindow, err);
+ }
}
});
});