Skip to content

Commit 3c52dbe

Browse files
himself65BridgeAR
authored andcommitted
net: shallow copy option when create Server
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]>
1 parent 4a747f6 commit 3c52dbe

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)