| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e15137 commit bc86084
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -282,13 +282,13 @@ const kSetNoDelay = Symbol('kSetNoDelay'); | |||
| 282 | 282 | ||
| 283 | 283 | function Socket(options) { | |
| 284 | 284 | if (!(this instanceof Socket)) return new Socket(options); | |
| 285 | - if (options.objectMode) { | ||
| 285 | + if (options?.objectMode) { | ||
| 286 | 286 | throw new ERR_INVALID_ARG_VALUE( | |
| 287 | 287 | 'options.objectMode', | |
| 288 | 288 | options.objectMode, | |
| 289 | 289 | 'is not supported' | |
| 290 | 290 | ); | |
| 291 | - } else if (options.readableObjectMode || options.writableObjectMode) { | ||
| 291 | + } else if (options?.readableObjectMode || options?.writableObjectMode) { | ||
| 292 | 292 | throw new ERR_INVALID_ARG_VALUE( | |
| 293 | 293 | `options.${ | |
| 294 | 294 | options.readableObjectMode ? 'readableObjectMode' : 'writableObjectMode' | |
| Back | FazBrowse Home | New Git URL |
0 commit comments