Skip to content
Browse files

Fixes issue gh-4 where eval was choking on bare function. Thanks @kmo…

  • Loading branch information...
1 parent f906d23 commit 2890f9746d65660e7310a0660234af21d9cd4d5a @micha committed Jun 17, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 jsawk
View
2 jsawk
@@ -932,7 +932,7 @@ replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
};
window.makeFilter = function(fun) {
try {
- return eval("function() { "+fun+"; return this }");
+ return eval("(function() { "+fun+"; return this })");
} catch (e) {
err("jsawk: script parse error: '"+fun+"'");
quit(3);

0 comments on commit 2890f97

Please sign in to comment.
Something went wrong with that request. Please try again.