fix silly scope issue

This commit is contained in:
Dane Springmeyer
2012-01-03 16:20:34 -08:00
parent 90b35f65ef
commit 1fa4501765
+4 -4
View File
@@ -588,17 +588,17 @@ MBTiles.prototype.putGrid = function(z, x, y, data, callback) {
/* /*
this._gridCache[id] = zlib.deflate(new Buffer(json, 'utf8')); this._gridCache[id] = zlib.deflate(new Buffer(json, 'utf8'));
*/ */
var that = this;
Step(function() { Step(function() {
zlib.deflate(new Buffer(json, 'utf8'),this); zlib.deflate(new Buffer(json, 'utf8'),this);
}, function(err,buffer) { }, function(err,buffer) {
if (err) return callback(err); if (err) return callback(err);
this._gridCache[id] = buffer; that._gridCache[id] = buffer;
// This corresponds to the grid_key table. // This corresponds to the grid_key table.
this._keyCache[id] = Object.keys(data.data || {}); that._keyCache[id] = Object.keys(data.data || {});
// This corresponds to the keymap table. // This corresponds to the keymap table.
_(this._dataCache).extend(data.data || {}); _(that._dataCache).extend(data.data || {});
} }
); );
} }