Skip to content

Commit

Permalink
mv var to top of function to be consistent with style in rest of file
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Oct 28, 2014
1 parent 74ae6f6 commit 369f2d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/rewire.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ var srcs = {
function internalRewire(parentModulePath, targetPath) {
var targetModule,
prelude,
appendix;
appendix,
src;

// Checking params
if (typeof targetPath !== "string") {
Expand Down Expand Up @@ -56,7 +57,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.
var src = fs.readFileSync(targetPath, "utf8");
src = fs.readFileSync(targetPath, "utf8");
if (detectStrictMode(src) === true) {
prelude = ' "use strict"; ' + prelude;
}
Expand Down

0 comments on commit 369f2d4

Please sign in to comment.