Use turbocarto only if there's a layer

This commit is contained in:
Rafa de la Torre 2019-06-14 15:12:21 +02:00
parent 3a782117f5
commit c62c4f548e

View File

@ -123,7 +123,7 @@ var CartoDatasource = require('./datasource');
this.style = stripComments(cartocss); this.style = stripComments(cartocss);
if (PointRenderer.isTurboCarto(this.style)) { if (PointRenderer.isTurboCarto(this.style) && self.layer) {
var datasource = new CartoDatasource(self.layer._tiles); var datasource = new CartoDatasource(self.layer._tiles);
turbocarto(this.style, datasource, function (err, parsedCartoCSS) { turbocarto(this.style, datasource, function (err, parsedCartoCSS) {
if (err) { if (err) {