Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a807a5

Browse files
committed
Merge pull request jhnns#14 from suisho/last_empty_line
- support module that without last empty line
2 parents 6d84a78 + 54e61d8 commit 1a807a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rewire.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ function internalRewire(parentModulePath, targetPath) {
3737
prelude = getImportGlobalsSrc();
3838

3939
// We append our special setter and getter.
40-
appendix = "module.exports.__set__ = " + __set__.toString() + "; ";
40+
appendix = "\n";
41+
appendix += "module.exports.__set__ = " + __set__.toString() + "; ";
4142
appendix += "module.exports.__get__ = " + __get__.toString() + "; ";
4243

4344
// Check if the module uses the strict mode.

0 commit comments

Comments
 (0)