Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 74ce4d8

Browse files
trivikraddaleax
authored andcommitted
quic: default options parameter in constructor
PR-URL: #152 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
1 parent de945c2 commit 74ce4d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/quic/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ class QuicSocket extends EventEmitter {
621621
#alpn = undefined;
622622
#stats = undefined;
623623

624-
constructor(options) {
624+
constructor(options = {}) {
625625
const {
626626
// The local IP address or hostname to bind to
627627
address,
@@ -662,7 +662,7 @@ class QuicSocket extends EventEmitter {
662662

663663
// True if an LRU should be used for add validation
664664
validateAddressLRU,
665-
} = validateQuicSocketOptions(options || {});
665+
} = validateQuicSocketOptions(options);
666666
super();
667667
const socketOptions =
668668
(validateAddress ? QUICSOCKET_OPTIONS_VALIDATE_ADDRESS : 0) |

0 commit comments

Comments
 (0)