Skip to content

Commit

Permalink
net: shallow copy option when create Server
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Aug 1, 2019
1 parent 1ee47d5 commit 96f27db
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 96f27db

Please sign in to comment.