Skip to content

Commit

Permalink
lib: implement consistent brace style
Browse files Browse the repository at this point in the history
This change is in preparation for lint-enforced brace style.

PR-URL: #8348
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Oct 26, 2016
1 parent 4f31071 commit f6e332d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 5 additions & 3 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,9 +802,11 @@ Readable.prototype.wrap = function(stream) {
// important when wrapping filters and duplexes.
for (var i in stream) {
if (this[i] === undefined && typeof stream[i] === 'function') {
this[i] = function(method) { return function() {
return stream[method].apply(stream, arguments);
}; }(i);
this[i] = function(method) {
return function() {
return stream[method].apply(stream, arguments);
};
}(i);
}
}

Expand Down
3 changes: 1 addition & 2 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,7 @@ Module._preloadModules = function(requests) {
var parent = new Module('internal/preload', null);
try {
parent.paths = Module._nodeModulePaths(process.cwd());
}
catch (e) {
} catch (e) {
if (e.code !== 'ENOENT') {
throw e;
}
Expand Down
3 changes: 1 addition & 2 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,7 @@ function createServerHandle(address, port, addressType, fd) {
if (typeof fd === 'number' && fd >= 0) {
try {
handle = createHandle(fd);
}
catch (e) {
} catch (e) {
// Not a fd we can listen on. This will trigger an error.
debug('listen invalid fd=' + fd + ': ' + e.message);
return uv.UV_EINVAL;
Expand Down

0 comments on commit f6e332d

Please sign in to comment.