Correctly check for enabled wms to determine zoom

Without this defensive check, a JS console error is thrown whenever wms
is not configured for a map visualization.
This commit is contained in:
Court Ewing 2016-07-15 17:15:10 -04:00
parent 6494caa789
commit c74041cadb

View file

@ -278,7 +278,7 @@ export default function MapFactory(Private, tilemap) {
TileMapMap.prototype._createMap = function (mapOptions) {
if (this.map) this.destroy();
if (this._attr.wms.enabled) {
if (this._attr.wms && this._attr.wms.enabled) {
_.assign(mapOptions, {
minZoom: 1,
maxZoom: 18