Skip to content

Commit

Permalink
http2: add constant to already destructured constants
Browse files Browse the repository at this point in the history
PR-URL: nodejs#28176
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
dnalborczyk authored and Trott committed Jul 30, 2019
1 parent 3a9cb5c commit 62c8c61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/internal/http2/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ const { Object, ObjectPrototype, Reflect } = primordials;

const assert = require('internal/assert');
const Stream = require('stream');
const Readable = Stream.Readable;
const binding = internalBinding('http2');
const constants = binding.constants;
const { Readable } = Stream;
const { constants } = internalBinding('http2');
const {
codes: {
ERR_HTTP2_HEADERS_SENT,
Expand Down Expand Up @@ -38,6 +37,7 @@ const kAborted = Symbol('aborted');

const {
HTTP2_HEADER_AUTHORITY,
HTTP2_HEADER_CONNECTION,
HTTP2_HEADER_METHOD,
HTTP2_HEADER_PATH,
HTTP2_HEADER_SCHEME,
Expand Down Expand Up @@ -95,7 +95,7 @@ function statusMessageWarn() {
}

function isConnectionHeaderAllowed(name, value) {
return name !== constants.HTTP2_HEADER_CONNECTION ||
return name !== HTTP2_HEADER_CONNECTION ||
value === 'trailers';
}

Expand Down

0 comments on commit 62c8c61

Please sign in to comment.