Fix time series google map

Check if layer exists to prevent an error.
More info [here](https://github.com/CartoDB/support/issues/1498#issuecomment-386035383)
This commit is contained in:
IagoLast 2018-05-03 13:12:36 +02:00
parent 742c2d9808
commit e784dcb048

View File

@ -142,7 +142,7 @@ var CartoDatasource = require('./datasource');
this._shader = shader; this._shader = shader;
this._Map = this._shader.getDefault().getStyle({}, { zoom: 0 }); this._Map = this._shader.getDefault().getStyle({}, { zoom: 0 });
var img_names = this._shader.getImageURLs(); var img_names = this._shader.getImageURLs();
if (this.layer.showLimitErrors) { if (this.layer && this.layer.showLimitErrors) {
img_names.push(ERROR_IMG_URL); img_names.push(ERROR_IMG_URL);
} }