Skip to content

Commit 7fb6a3d

Browse files
committed
prevent glyph loading errors from blocking tiles
ref #662
1 parent 79c897f commit 7fb6a3d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

js/symbol/glyphsource.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,11 @@ GlyphSource.prototype.loadRange = function(fontstack, range, callback) {
9393
var url = glyphUrl(fontstack, rangeName, this.url);
9494

9595
getArrayBuffer(url, function(err, data) {
96-
if (err) return callback(err);
97-
var glyphs = new Glyphs(new Protobuf(new Uint8Array(data)));
96+
var glyphs = !err && new Glyphs(new Protobuf(new Uint8Array(data)));
9897
for (var i = 0; i < loading[range].length; i++) {
99-
loading[range][i](undefined, range, glyphs);
98+
loading[range][i](err, range, glyphs);
10099
}
101-
delete loading[range][i];
100+
delete loading[range];
102101
});
103102
}
104103
};

0 commit comments

Comments
 (0)