Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2014-10-28 21:56:55 +0300
committerRich Trott <rtrott@gmail.com>2014-10-28 21:56:55 +0300
commit5b237d99ef054d6a0ddc68412af1d46a355d13c2 (patch)
tree0af01385fdb206f61927a5d2349e49b06bb51a1c /lib
parent93d3907216f1a0ea4bc24eb0bc83775f84a6063c (diff)
fix leak, add test, for #33
Diffstat (limited to 'lib')
-rw-r--r--lib/rewire.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rewire.js b/lib/rewire.js
index e0b56f1..5644599 100644
--- a/lib/rewire.js
+++ b/lib/rewire.js
@@ -56,7 +56,7 @@ function internalRewire(parentModulePath, targetPath) {
// Check if the module uses the strict mode.
// If so we must ensure that "use strict"; stays at the beginning of the module.
- src = fs.readFileSync(targetPath, "utf8");
+ var src = fs.readFileSync(targetPath, "utf8");
if (detectStrictMode(src) === true) {
prelude = ' "use strict"; ' + prelude;
}