Skip to content

Commit

Permalink
net: shallow copy option when create Server
Browse files Browse the repository at this point in the history
PR-URL: #28924
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
himself65 authored and BridgeAR committed Aug 6, 2019
1 parent 4a747f6 commit 3c52dbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ function Server(options, connectionListener) {
options = {};
this.on('connection', connectionListener);
} else if (options == null || typeof options === 'object') {
options = options || {};
options = { ...options };

if (typeof connectionListener === 'function') {
this.on('connection', connectionListener);
Expand Down

0 comments on commit 3c52dbe

Please sign in to comment.