Permalink
Browse files

Remove eval statement

  • Loading branch information...
nvcexploder committed Sep 25, 2014
1 parent 83f0241 commit b751602d8cb7194ee62a61e085069679525138c4
Showing with 2 additions and 8 deletions.
  1. +2 −8 lib/batch.js
@@ -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;
}

0 comments on commit b751602

Please sign in to comment.