Skip to content

Commit 62c8c61

Browse files
dnalborczykTrott
authored andcommitted
http2: add constant to already destructured constants
PR-URL: nodejs#28176 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 3a9cb5c commit 62c8c61

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/internal/http2/compat.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ const { Object, ObjectPrototype, Reflect } = primordials;
44

55
const assert = require('internal/assert');
66
const Stream = require('stream');
7-
const Readable = Stream.Readable;
8-
const binding = internalBinding('http2');
9-
const constants = binding.constants;
7+
const { Readable } = Stream;
8+
const { constants } = internalBinding('http2');
109
const {
1110
codes: {
1211
ERR_HTTP2_HEADERS_SENT,
@@ -38,6 +37,7 @@ const kAborted = Symbol('aborted');
3837

3938
const {
4039
HTTP2_HEADER_AUTHORITY,
40+
HTTP2_HEADER_CONNECTION,
4141
HTTP2_HEADER_METHOD,
4242
HTTP2_HEADER_PATH,
4343
HTTP2_HEADER_SCHEME,
@@ -95,7 +95,7 @@ function statusMessageWarn() {
9595
}
9696

9797
function isConnectionHeaderAllowed(name, value) {
98-
return name !== constants.HTTP2_HEADER_CONNECTION ||
98+
return name !== HTTP2_HEADER_CONNECTION ||
9999
value === 'trailers';
100100
}
101101

0 commit comments

Comments
 (0)