Skip to content

Commit

Permalink
issue #1728 Using const or let in global scope have problem in nodejs…
Browse files Browse the repository at this point in the history
… actions
  • Loading branch information
tardieu committed Mar 1, 2017
1 parent affab0d commit fedf2db
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 @@ -67,8 +67,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(){\n' + 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 fedf2db

Please sign in to comment.