Skip to content

Commit

Permalink
prevent glyph loading errors from blocking tiles
Browse files Browse the repository at this point in the history
ref #662
  • Loading branch information
ansis committed Aug 8, 2014
1 parent 79c897f commit 7fb6a3d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions js/symbol/glyphsource.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ GlyphSource.prototype.loadRange = function(fontstack, range, callback) {
var url = glyphUrl(fontstack, rangeName, this.url);

getArrayBuffer(url, function(err, data) {
if (err) return callback(err);
var glyphs = new Glyphs(new Protobuf(new Uint8Array(data)));
var glyphs = !err && new Glyphs(new Protobuf(new Uint8Array(data)));
for (var i = 0; i < loading[range].length; i++) {
loading[range][i](undefined, range, glyphs);
loading[range][i](err, range, glyphs);
}
delete loading[range][i];
delete loading[range];
});
}
};
Expand Down

0 comments on commit 7fb6a3d

Please sign in to comment.