Skip to content

Commit

Permalink
issue apache#1728 Using const or let in global scope have problem in …
Browse files Browse the repository at this point in the history
…nodejs actions (apache#1929)
  • Loading branch information
tardieu authored and rabbah committed Mar 10, 2017
1 parent 7623220 commit 7d0562a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/nodejsActionBase/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ function NodeActionRunner() {
} else {
// The code is a plain old JS file.
try {
eval(message.code);
thisRunner.userScriptMain = eval(message.main);
thisRunner.userScriptMain = eval('(function(){' + message.code + '\nreturn ' + message.main + '})()');
assertMainIsFunction();
// See comment above about 'true'; it has no specific meaning.
return Promise.resolve(true);
Expand Down

0 comments on commit 7d0562a

Please sign in to comment.