Skip to content

Commit

Permalink
Remove unused parameter in call to unloadVectorData
Browse files Browse the repository at this point in the history
extends #3351 which changed the function unloadVectorData to take 0 parameters instead of 1. 

* FIX unloadVectorData call with 1 argument where 0 are expected

* Changed test to assert that unloadVectorData is called with 0 parameters before overwriting
  • Loading branch information
lkrombeen authored and anandthakker committed Mar 13, 2017
1 parent cacc5f2 commit 7461e57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/source/tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Tile {
*/
loadVectorData(data, painter) {
if (this.hasData()) {
this.unloadVectorData(painter);
this.unloadVectorData();
}

this.state = 'loaded';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/source/tile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ test('querySourceFeatures', (t) => {

tile.loadVectorData(null, painter);

t.ok(tile.unloadVectorData.calledWith(painter));
t.ok(tile.unloadVectorData.calledWith());
t.end();
});

Expand Down

0 comments on commit 7461e57

Please sign in to comment.