Skip to content

Commit

Permalink
Fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Jul 11, 2024
1 parent 742422f commit 98ce7b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export class VectorTileFeature {
/** @type {number | undefined} */
this.id = undefined;

// Private
this._pbf = pbf;
this._geometry = -1;
this._keys = keys;
Expand Down Expand Up @@ -212,7 +211,7 @@ VectorTileFeature.types = ['Unknown', 'Point', 'LineString', 'Polygon'];
function readFeature(tag, feature, pbf) {
if (tag === 1) feature.id = pbf.readVarint();
else if (tag === 2) readTag(pbf, feature);
else if (tag === 3) feature.type = pbf.readVarint();
else if (tag === 3) feature.type = /** @type {0 | 1 | 2 | 3} */ (pbf.readVarint());
else if (tag === 4) feature._geometry = pbf.pos;
}

Expand Down

0 comments on commit 98ce7b0

Please sign in to comment.