Skip to content

Commit

Permalink
socket: fix close arg check.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Mar 6, 2019
1 parent 4ce782d commit efdecd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ class Port extends Socket {
}

close(callback) {
if (callback != null && typeof callback === 'function')
if (callback != null && typeof callback !== 'function')
throw new TypeError('"callback" must be a function.');

if (this._closed) {
Expand Down

0 comments on commit efdecd3

Please sign in to comment.