Skip to content

Commit

Permalink
fix(client): this should resolve issues with caching requests
Browse files Browse the repository at this point in the history
specifically, when getting a method back from getPassthroughApiMethod, the apiCache will be passed
along as long as it is included.
  • Loading branch information
KenEucker committed Dec 22, 2023
1 parent 3646ba3 commit e1875ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "biketag",
"version": "3.2.0",
"version": "3.2.1",
"description": "The Javascript client API for BikeTag Games",
"main": "./biketag.node.js",
"browser": "./biketag.js",
Expand Down
5 changes: 3 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,11 @@ export class BikeTagClient extends EventEmitter {
const getPayload = this.getInitialPayload.bind(this)
const getOptions = this.getDefaultOptions.bind(this)

return function (opts) {
return function (opts, cache) {
return method.bind(binding)(
client,
getOptions(getPayload(opts), dataType)
getOptions(getPayload(opts), dataType),
cache
)
}
}
Expand Down

0 comments on commit e1875ff

Please sign in to comment.