Adding provider checker

This commit is contained in:
xavijam 2016-12-05 15:13:30 +01:00
parent 62fc84b9be
commit 16564df47e

View File

@ -393,7 +393,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
setCartoCSS: function(cartocss) {
if (!this.renderer) throw new Error('renderer is not valid');
if (this.provider.options.named_map) {
if (this.provider && this.provider.options.named_map) {
console.log('Torque layer: CartoCSS style on named maps is read-only');
return false;
}