Skip to content
This repository was archived by the owner on Apr 20, 2019. It is now read-only.

Commit b751602

Browse files
committed
Remove eval statement
1 parent 83f0241 commit b751602

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Diff for: lib/batch.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,10 @@ internals.batch = function (batchRequest, resultsData, pos, parts, callback) {
146146
var ref = resultsData.resultsMap[parts[i].index];
147147

148148
if (ref) {
149-
var value = null;
150-
151-
try {
152-
eval('value = ref.' + parts[i].value + ';');
153-
}
154-
catch (e) {
155-
error = new Error(e.message);
156-
}
149+
var value = ref[parts[i].value]||null;
157150

158151
if (value) {
152+
159153
if (value.match && value.match(/^[\w:]+$/)) {
160154
path += value;
161155
}

0 commit comments

Comments
 (0)