diff --git a/lib/torque/gmaps/torque.js b/lib/torque/gmaps/torque.js index 8e89fec..deb8deb 100644 --- a/lib/torque/gmaps/torque.js +++ b/lib/torque/gmaps/torque.js @@ -118,7 +118,9 @@ GMapsTorqueLayer.prototype = torque.extend({}, if(!this.hidden) return this; this.hidden = false; this.play(); - this.options.steps === 1 && this.redraw(); + if (this.options.steps === 1){ + this.redraw(); + } return this; }, diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index 9e9b0c1..7d2c5b7 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -164,7 +164,9 @@ L.TorqueLayer = L.CanvasLayer.extend({ if(!this.hidden) return this; this.hidden = false; this.play(); - this.options.steps === 1 && this.redraw(); + if (this.options.steps === 1){ + this.redraw(); + } return this; },