Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #1728 Using const or let in global scope have problem in nodejs… #1929

Merged
merged 1 commit into from
Mar 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
issue #1728 Using const or let in global scope have problem in nodejs…
… actions
  • Loading branch information
tardieu committed Mar 7, 2017
commit 0247d213e0e2e6c020520ae12481db612f63e520
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