mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
net: prefer === to ==
* Change === to == in one place * Add explanation about another non-strict if-statement PR-URL: https://github.com/nodejs/node/pull/11513 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
434b00be8a
commit
a7df345921
1 file changed
+4
-1
+4
-1
@@ -137,6 +137,9 @@ function Socket(options) {
|
||||
} else if (options.fd !== undefined) {
|
||||
this._handle = createHandle(options.fd);
|
||||
this._handle.open(options.fd);
|
||||
// options.fd can be string (since it user-defined),
|
||||
// so changing this to === would be semver-major
|
||||
// See: https://github.com/nodejs/node/pull/11513
|
||||
if ((options.fd == 1 || options.fd == 2) &&
|
||||
(this._handle instanceof Pipe) &&
|
||||
process.platform === 'win32') {
|
||||
@@ -1057,7 +1060,7 @@ function afterConnect(status, handle, req, readable, writable) {
|
||||
self._connecting = false;
|
||||
self._sockname = null;
|
||||
|
||||
if (status == 0) {
|
||||
if (status === 0) {
|
||||
self.readable = readable;
|
||||
self.writable = writable;
|
||||
self._unrefTimer();
|
||||
|
||||
Reference in new issue
Block a user