Skip to content

Commit

Permalink
fix collectResourceTiming assignment mapbox#3709
Browse files Browse the repository at this point in the history
  • Loading branch information
stepankuzmin committed Jan 12, 2020
1 parent da23634 commit d416725
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/source/vector_tile_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class VectorTileSource extends Evented implements Source {
_tileJSONRequest: ?Cancelable;
_loaded: boolean;

constructor(id: string, options: {...VectorSourceSpecification, collectResourceTiming?: boolean}, dispatcher: Dispatcher, eventedParent: Evented) {
constructor(id: string, options: VectorSourceSpecification & {collectResourceTiming: boolean}, dispatcher: Dispatcher, eventedParent: Evented) {
super();
this.id = id;
this.dispatcher = dispatcher;
Expand All @@ -58,7 +58,7 @@ class VectorTileSource extends Evented implements Source {
extend(this, pick(options, ['url', 'scheme', 'tileSize', 'promoteId']));
this._options = extend({type: 'vector'}, options);

this._collectResourceTiming = !!options.collectResourceTiming;
this._collectResourceTiming = options.collectResourceTiming;

if (this.tileSize !== 512) {
throw new Error('vector tile sources must have a tileSize of 512');
Expand Down

0 comments on commit d416725

Please sign in to comment.