From 7461e57b97a43d0dd933b84d08a02fe5142504ab Mon Sep 17 00:00:00 2001 From: lkrombeen Date: Mon, 13 Mar 2017 13:42:07 +0100 Subject: [PATCH] Remove unused parameter in call to unloadVectorData 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 --- src/source/tile.js | 2 +- test/unit/source/tile.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/source/tile.js b/src/source/tile.js index f31ddde7cc7..7b13a62aba7 100644 --- a/src/source/tile.js +++ b/src/source/tile.js @@ -69,7 +69,7 @@ class Tile { */ loadVectorData(data, painter) { if (this.hasData()) { - this.unloadVectorData(painter); + this.unloadVectorData(); } this.state = 'loaded'; diff --git a/test/unit/source/tile.test.js b/test/unit/source/tile.test.js index 94f54713f4c..ab336300a99 100644 --- a/test/unit/source/tile.test.js +++ b/test/unit/source/tile.test.js @@ -87,7 +87,7 @@ test('querySourceFeatures', (t) => { tile.loadVectorData(null, painter); - t.ok(tile.unloadVectorData.calledWith(painter)); + t.ok(tile.unloadVectorData.calledWith()); t.end(); });