cache variables for looping

This commit is contained in:
javi 2014-09-17 11:47:08 +02:00
parent a2bc058063
commit 1b7cf8f8f7

View File

@ -85,8 +85,9 @@ L.TorqueLayer = L.CanvasLayer.extend({
}, },
_clearTileCaches: function() { _clearTileCaches: function() {
for(var t in this._tiles) { var t, tile;
var tile = this._tiles[t]; for(t in this._tiles) {
tile = this._tiles[t];
if (tile && tile._tileCache) { if (tile && tile._tileCache) {
tile._tileCache = null; tile._tileCache = null;
} }