Skip to content

Commit 77a112c

Browse files
committed
Fixed JavaScript "no-eval" violation.
1 parent fbb4f07 commit 77a112c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
99
"new-cap": [0, {"newIsCap": true, "capIsNew": true}],
1010
"no-alert": [0],
11-
"no-eval": [1],
11+
"no-eval": [2],
1212
"no-extend-native": [2, {"exceptions": ["Date", "String"]}],
1313
"no-multi-spaces": [2],
1414
"no-octal-escape": [2],

django/contrib/gis/static/gis/js/OLMapWidget.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
} else if (options.geom_name === 'GeometryCollection') {
176176
options.geom_type = OpenLayers.Geometry.Collection;
177177
} else {
178-
options.geom_type = eval('OpenLayers.Geometry.' + options.geom_name);
178+
options.geom_type = OpenLayers.Geometry[options.geom_name];
179179
}
180180

181181
// Default options

0 commit comments

Comments
 (0)