chore: enable logical assignment babel plugin (#8416)

This commit is contained in:
Yury Semikhatsky 2021-08-24 14:29:20 -07:00 committed by GitHub
parent c0010d16c6
commit 7f02e9ebb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -6,6 +6,7 @@
["@babel/plugin-transform-typescript", { "allowDeclareFields": true } ],
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-transform-modules-commonjs"
],

View file

@ -272,8 +272,8 @@ export class Route extends ChannelOwner<channels.RouteChannel, channels.RouteIni
let useInterceptedResponseBody;
let { status: statusOption, headers: headersOption, body: bodyOption } = options;
if (options._response) {
statusOption = statusOption || options._response.status();
headersOption = headersOption || options._response.headers();
statusOption ||= options._response.status();
headersOption ||= options._response.headers();
if (options.body === undefined && options.path === undefined) {
if (options._response === this._interceptedResponse)
useInterceptedResponseBody = true;