Skip to content

Commit 4101e40

Browse files
committed
adjust duplicate map variables in map_test
1 parent b261c19 commit 4101e40

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/jasmine/tests/map_test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,9 @@ describe('map plots', function() {
730730
'Nk+M/wHwAEBgIApD5fRAAAAABJRU5ErkJggg==';
731731

732732
Plotly.react(gd, makeFigure(redImage)).then(function() {
733-
var map = gd._fullLayout.map._subplot;
734-
map = map.map;
735-
layerSource = map.getSource(map.layerList[1].idSource);
733+
var _map = gd._fullLayout.map._subplot;
734+
map = _map.map;
735+
layerSource = map.getSource(_map.layerList[1].idSource);
736736

737737
spyOn(layerSource, 'updateImage').and.callThrough();
738738
spyOn(map, 'removeSource').and.callThrough();
@@ -745,9 +745,9 @@ describe('map plots', function() {
745745
expect(map.removeSource).not.toHaveBeenCalled();
746746

747747
// Check order of layers
748-
var map = gd._fullLayout.map._subplot;
749-
var mapLayers = map.getMapLayers();
750-
var plotlyjsLayers = map.layerList;
748+
var _map = gd._fullLayout.map._subplot;
749+
var mapLayers = _map.getMapLayers();
750+
var plotlyjsLayers = _map.layerList;
751751

752752
var indexLower = mapLayers.findIndex(function(layer) {
753753
return layer.id === 'plotly-layout-layer-' + plotlyjsLayers[0].uid;

0 commit comments

Comments
 (0)