Skip to content

Commit

Permalink
prefer ?. for optional branching
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Feb 8, 2024
1 parent 87701e3 commit 74bf234
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/lib/createGraphQLSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ export function createGraphQLSchema (
endSession: graphql.field({
type: graphql.nonNull(graphql.Boolean),
async resolve (rootVal, args, context) {
if (context.sessionStrategy) {
await context.sessionStrategy.end({ context })
}
await context.sessionStrategy?.end({ context })
return true
},
}),
Expand Down

0 comments on commit 74bf234

Please sign in to comment.