Skip to content

Commit b7ed877

Browse files
committed
refactor: avoid assignment operators in conditional expressions
1 parent 106f94a commit b7ed877

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/shared/session.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ export default async function sessionHandler(ctx, next) {
4646
await ctx.oidc.session.save(ttl);
4747
}
4848

49-
let setCookie;
50-
// eslint-disable-next-line no-cond-assign
51-
if ((setCookie = ctx.response.get('set-cookie'))) {
49+
let setCookie = ctx.response.get('set-cookie');
50+
if (setCookie) {
5251
if (typeof setCookie === 'string') {
5352
setCookie = [setCookie];
5453
}

0 commit comments

Comments
 (0)