plainheart commented on code in PR #21640:
URL: https://github.com/apache/echarts/pull/21640#discussion_r3329985590
##########
src/coord/geo/GeoJSONResource.ts:
##########
@@ -161,9 +161,5 @@ function calculateBoundingRect(regions: GeoJSONRegion[]):
BoundingRect {
}
function parseInput(source: GeoJSONSourceInput): GeoJSON | GeoJSONCompressed {
- return !isString(source)
- ? source
- : (typeof JSON !== 'undefined' && JSON.parse)
- ? JSON.parse(source)
- : (new Function('return (' + source + ');'))();
+ return !isString(source) ? source : JSON.parse(source);
}
Review Comment:
@100pah As the current codebase, do you think it is necessary to add JSON
API check?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]