Skip to content

Commit

Permalink
fix(bounce): guard against incomplete context
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Jan 5, 2022
1 parent 5e8611b commit 380cdd0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/helix-shared-bounce/src/bounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function bounce(func, { responder, timeout = 500 }) {
const id = request.headers.get('x-hlx-bounce-id') || process.env.HELIX_DEBOUNCE;
if (id) {
// use the provided bounce id
context.invocation = context.invocation || {};
context.invocation.bounceId = id;
// the function has already been bounced, let's just run it
return func(request, context);
Expand Down

0 comments on commit 380cdd0

Please sign in to comment.