Skip to content

Commit 96f27db

Browse files
committed
net: shallow copy option when create Server
1 parent 1ee47d5 commit 96f27db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ function Server(options, connectionListener) {
10781078
options = {};
10791079
this.on('connection', connectionListener);
10801080
} else if (options == null || typeof options === 'object') {
1081-
options = options || {};
1081+
options = { ...options };
10821082

10831083
if (typeof connectionListener === 'function') {
10841084
this.on('connection', connectionListener);

0 commit comments

Comments
 (0)