Skip to content

Commit

Permalink
Merged pull request #19 from @maghoff with thanks
Browse files Browse the repository at this point in the history
Fix failed loading of CommonJS modules that end in a line comment.
  • Loading branch information
maghoff authored and benoitc committed May 5, 2012
1 parent 8704d1f commit 2c265e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/couch/share/server/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var Couch = {
// create empty exports object before executing the module,
// stops circular requires from filling the stack
ddoc._module_cache[newModule.id] = {};
var s = "function (module, exports, require) { " + newModule.current + " }";
var s = "function (module, exports, require) { " + newModule.current + "\n }";
try {
var func = sandbox ? evalcx(s, sandbox, newModule.id) : eval(s);
func.apply(sandbox, [newModule, newModule.exports, function(name) {
Expand Down

0 comments on commit 2c265e9

Please sign in to comment.