Skip to content

Commit

Permalink
Merge pull request #2710 from Dallas62/path-4
Browse files Browse the repository at this point in the history
Fix JSHint warning
Travis Webb committed Mar 29, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents fc71e60 + 2eaa924 commit 14be847
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/hooks/views/consolidate.js
Original file line number Diff line number Diff line change
@@ -266,7 +266,7 @@ module.exports = function(sailsAppPath) {
if (!options || (options && !options.cache)) engine.cache = {};

engine.onLoad = function(path, callback){
if ('' == extname(path)) path += '.' + ext;
if ('' === extname(path)) path += '.' + ext;
if ('/' !== path[0]) path = views + '/' + path;
read(path, options, callback);
};
2 changes: 1 addition & 1 deletion lib/preinstall_npmcheck.js
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ var checkVersion = function(v,v2) {

}

var found = undefined;
var found;
v.forEach(function(item,key) {
if(found === undefined){

9 changes: 1 addition & 8 deletions lib/router/res.js
Original file line number Diff line number Diff line change
@@ -3,10 +3,8 @@
*/
var util = require('util');
var Transform = require('stream').Transform;
var path = require('path');
var _ = require('lodash');
var MockRes = require('mock-res');
var fsx = require('fs-extra');


/**
@@ -94,8 +92,7 @@ module.exports = function buildResponse (req, _res) {

// Track whether headers have been written
// (TODO: pull all this into mock-res via a PR)
var headersWritten = false;


// res.writeHead() is wrapped in closure by the `on-header` module,
// but it still needs the underlying impl
res.writeHead = function ( /* statusCode, [reasonPhrase], headers */) {
@@ -140,10 +137,6 @@ module.exports = function buildResponse (req, _res) {
res._clientRes.statusCode = res.statusCode;
}


// Flag headers as written.
headersWritten = true;

};


0 comments on commit 14be847

Please sign in to comment.