Skip to content

Commit

Permalink
No need to copy the content of the global scope into new bindings.
Browse files Browse the repository at this point in the history
Fixes #27
  • Loading branch information
malaporte committed Nov 14, 2017
1 parent 2d1f180 commit ceceeaf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/coveo/nashorn_modules/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,7 @@ private Module compileModuleAndPutInCache(Folder parent, String fullPath, String
private Module compileJavaScriptModule(Folder parent, String fullPath, String code)
throws ScriptException {

Bindings engineScope = engine.getBindings(ScriptContext.ENGINE_SCOPE);
Bindings module = createSafeBindings();
module.putAll(engineScope);

// If we have cached bindings, use them to rebind exports instead of creating new ones
Bindings exports = refCache.get().get(fullPath);
Expand Down

0 comments on commit ceceeaf

Please sign in to comment.