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

Commit

Permalink
Remove eval statement
Browse files Browse the repository at this point in the history
  • Loading branch information
nvcexploder committed Sep 25, 2014
1 parent 83f0241 commit b751602
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,10 @@ internals.batch = function (batchRequest, resultsData, pos, parts, callback) {
var ref = resultsData.resultsMap[parts[i].index];

if (ref) {
var value = null;

try {
eval('value = ref.' + parts[i].value + ';');
}
catch (e) {
error = new Error(e.message);
}
var value = ref[parts[i].value]||null;

if (value) {

if (value.match && value.match(/^[\w:]+$/)) {
path += value;
}
Expand Down

0 comments on commit b751602

Please sign in to comment.