Skip to content

Commit

Permalink
Use ?? for the perEventContextResolver check
Browse files Browse the repository at this point in the history
  • Loading branch information
tgriesser committed Mar 23, 2020
1 parent c9af2d1 commit 1d0b6af
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/subscription/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ function subscribeImpl(
// "ExecuteQuery" algorithm, for which `execute` is also used.
// If `perEventContextResolver` is provided, it is invoked with the original
// `contextValue` to return a new context unique to this `execute`.
const perEventContextResolverFn =
typeof perEventContextResolver === 'function'
? perEventContextResolver
: ctx => ctx;
const perEventContextResolverFn = perEventContextResolver ?? (ctx => ctx);

const mapSourceToResponse = payload =>
execute({
Expand Down

0 comments on commit 1d0b6af

Please sign in to comment.