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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • 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.