Skip to content

Commit 4c73149

Browse files
committed
【UT】fix
1 parent 0c14735 commit 4c73149

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/openlayers/mapping/WebMapSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,15 +1705,15 @@ describe('openlayers_WebMap', () => {
17051705
if (url.indexOf('web/datas/676516522/content.json') > -1) {
17061706
return Promise.resolve(new Response(layerData_CSV));
17071707
} else if (url.indexOf('dataflow.json') > -1) {
1708-
const dataflowLayerDataCopy = CommonUtil.cloneObject(dataflowLayerData);
1708+
const dataflowLayerDataCopy = JSON.parse(JSON.stringify(dataflowLayerData));
17091709
dataflowLayerDataCopy.dataflow.urls[0].url = urlDataFlow;
17101710
return Promise.resolve(new Response(JSON.stringify(dataflowLayerDataCopy.dataflow)));
17111711
} else if (url.indexOf('broadcast') > -1) {
17121712
return Promise.resolve(new Response(JSON.stringify(dataflowLayerData.broadcast)));
17131713
} else if (url.indexOf('subscribe') > -1) {
17141714
return Promise.resolve(new Response(JSON.stringify(dataflowLayerData.subscribe)));
17151715
} else if (url.indexOf('map.json') > -1) {
1716-
const dataflowLayerCopy = CommonUtil.cloneObject(dataflowLayer);
1716+
const dataflowLayerCopy = JSON.parse(JSON.stringify(dataflowLayer));
17171717
dataflowLayerCopy.layers[0].url = urlDataFlow;
17181718
dataflowLayerCopy.layers[1].url = urlDataFlow;
17191719
dataflowLayerCopy.layers[2].url = urlDataFlow;

0 commit comments

Comments
 (0)