Skip to content

Commit 8e50eeb

Browse files
committed
fix sonar
1 parent b120a42 commit 8e50eeb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sonar.projectVersion=9.0.0
66
# Comma-separated paths to directories with sources (required)
77
sonar.sources=src/
88
sonar.inclusions=src/**/*.js
9-
sonar.exclusions=src/legacy/**/*.js
9+
sonar.exclusions=src/legacy/**/*.js,src/common/style/CartoCSS.js
1010
sonar.test.inclusions=test/**/*.js
1111

1212
# Language

src/common/iServer/BuildCacheJobParameter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ SuperMap.BuildCacheJobParameter.toObject = function (buildCacheJobParameter, tem
9191
tempObj['input'][name] = buildCacheJobParameter[name];
9292
continue;
9393
}
94-
if (name === "cacheName" || name === "cacheType" || name === "serverAdresses" || name === "database" || name === "version") {
94+
if (SuperMap.Util.indexOf(["cacheName", "cacheType", "serverAdresses", "database", "version"], name) > -1) {
9595
tempObj['output'] = tempObj['output'] || {};
9696
tempObj['output'][name] = buildCacheJobParameter[name];
9797
continue;

src/leaflet/core/Util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ L.Util.Csv2GeoJSON = function (csv, options) {
112112
var campos = csv[num_linea].trim().split(options.fieldSeparator)
113113
, lng = parseFloat(campos[titulos.indexOf(options.longitudeTitle)])
114114
, lat = parseFloat(campos[titulos.indexOf(options.latitudeTitle)]);
115-
if (campos.length == titulos.length && lng < 180 && lng > -180 && lat < 90 && lat > -90) {
115+
if (campos.length == titulos.length && Math.abs(lng) < 180 && Math.abs(lat) < 90) {
116116
var feature = {};
117117
feature["type"] = "Feature";
118118
feature["geometry"] = {};

0 commit comments

Comments
 (0)