kopia lustrzana https://github.com/rastapasta/mapscii
Hide "Unimplemented type: 4" error
rodzic
4fe9a60a0c
commit
50294ac633
13
src/Tile.js
13
src/Tile.js
|
@ -30,7 +30,18 @@ class Tile {
|
|||
}
|
||||
|
||||
_loadTile(buffer) {
|
||||
this.tile = new VectorTile(new Protobuf(buffer));
|
||||
try {
|
||||
this.tile = new VectorTile(new Protobuf(buffer));
|
||||
} catch (error) {
|
||||
// Ignoring upstream issue https://github.com/rastapasta/mapscii/issues/87
|
||||
if (error.message === 'Unimplemented type: 4') {
|
||||
this.tile = {
|
||||
layers: [],
|
||||
};
|
||||
return;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
_unzipIfNeeded(buffer) {
|
||||
|
|
Ładowanie…
Reference in New Issue