Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
lib: refactor to use optional chaining#38697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -561,7 +561,7 @@ class Control extends EventEmitter{ | ||||||
| } | ||||||
| get fd(){ | ||||||
| return this.#channel ? this.#channel.fd : undefined; | ||||||
| return this.#channel?.fd ?? undefined; | ||||||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggested change
| ||||||
| } | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -221,7 +221,7 @@ const proxySocketHandler ={ | ||||||
| if (stream.destroyed) | ||||||
| return false; | ||||||
| const request = stream[kRequest]; | ||||||
| return request ? request.readable : stream.readable; | ||||||
| return request?.readable ?? stream.readable; | ||||||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggested change
| ||||||
| case 'setTimeout': | ||||||
| const session = stream.session; | ||||||
| if (session !== undefined) | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -199,7 +199,7 @@ function debugStream(id, sessionType, message, ...args){ | ||||||
| function debugStreamObj(stream, message, ...args){ | ||||||
| const session = stream[kSession]; | ||||||
| const type = session ? session[kType] : undefined; | ||||||
| const type = session?.kType ?? undefined; | ||||||
Contributor
| ||||||
| consttype=session?.kType??undefined; | |
| consttype=stream[kSession]?.[kType]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.