Doh. Only delete from cache if there is an error.
This commit is contained in:
@@ -61,7 +61,7 @@ function MBTiles(uri, callback) {
|
||||
var mbtiles = cache[key];
|
||||
if (!mbtiles.open && !mbtiles.error) {
|
||||
mbtiles.once('open', function(err, mbtiles) {
|
||||
delete cache[key];
|
||||
if (err) delete cache[key];
|
||||
callback(err, mbtiles);
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user