Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lib/_tls_legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -741,11 +741,12 @@ function SecurePair(context, isServer, requestCert, rejectUnauthorized,
this._rejectUnauthorized = rejectUnauthorized ? true : false;
this._requestCert = requestCert ? true : false;

this.ssl = new Connection(this.credentials.context,
this._isServer ? true : false,
this._isServer ? this._requestCert :
options.servername,
this._rejectUnauthorized);
this.ssl = new Connection(
this.credentials.context,
this._isServer ? true : false,
this._isServer ? this._requestCert : options.servername,
this._rejectUnauthorized
);

if (this._isServer) {
this.ssl.onhandshakestart = () => onhandshakestart.call(this);
Expand Down
3 changes: 1 addition & 2 deletions lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,7 @@ function handleGroup(self, group, width, maxColumns) {
var item = group[idx];
self._writeToOutput(item);
if (col < maxColumns - 1) {
for (var s = 0, itemLen = item.length; s < width - itemLen;
s++) {
for (var s = 0, itemLen = item.length; s < width - itemLen; s++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, this could be simplified to for (var s = 0; s < width - item.length; s++), V8 should be able to handle that.

Copy link
Member Author

@Trott Trott Jul 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saving that for Code + Learn next week. :-D

self._writeToOutput(' ');
}
}
Expand Down