mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
fix(ext/node): add null check for kStreamBaseField (#26368)
It's not guaranteed that `kStreamBaseField` is not undefined, so added a check for it. Closes https://github.com/denoland/deno/issues/26363
This commit is contained in:
parent
02e5a7a012
commit
8f3eb9d0e7
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ export class TCP extends ConnectionWrap {
|
||||||
* @return An error status code.
|
* @return An error status code.
|
||||||
*/
|
*/
|
||||||
setNoDelay(noDelay: boolean): number {
|
setNoDelay(noDelay: boolean): number {
|
||||||
if ("setNoDelay" in this[kStreamBaseField]) {
|
if (this[kStreamBaseField] && "setNoDelay" in this[kStreamBaseField]) {
|
||||||
this[kStreamBaseField].setNoDelay(noDelay);
|
this[kStreamBaseField].setNoDelay(noDelay);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue