Skip to content

Commit

Permalink
docs: fix incorrect passthrough example
Browse files Browse the repository at this point in the history
  • Loading branch information
HW13 committed Dec 15, 2023
1 parent bce669d commit cada707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ test('root plugin', async ({ is }) => {
function injectFoo (...args) {
fooCalls.push(args)
// Note: if the original decorator uses `this` to access the request/reply/instance
// you will need to bind it -> `Symbol.for('call-original').bind(this)`
const originalFoo = Symbol.for('call-original')
// you will need to bind it -> `injectFoo[Symbol.for('call-original')].bind(this)`
const originalFoo = injectFoo[Symbol.for('call-original')]
return originalFoo(...args)
}

Expand Down

0 comments on commit cada707

Please sign in to comment.