Skip to content

Commit

Permalink
fix: Access token callback can return null (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecabaco authored Dec 5, 2024
1 parent e70fa7e commit 7fb3da0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/RealtimeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default class RealtimeClient {
message: [],
}
fetch: Fetch
accessToken: (() => Promise<string>) | null = null
accessToken: (() => Promise<string | null>) | null = null
worker?: boolean
workerUrl?: string
workerRef?: Worker
Expand Down
2 changes: 0 additions & 2 deletions test/channel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,6 @@ describe('send', () => {
const pushStub = sinon.stub(new_channel, '_push')

new_channel.subscribe(async (status) => {
console.log(status)
if (status === 'SUBSCRIBED') {
subscribed = true
await new_channel.send({ type: 'broadcast', event: 'test' })
Expand Down Expand Up @@ -1232,7 +1231,6 @@ describe('send', () => {
const pushStub = sinon.stub(new_channel, '_push')

new_channel.subscribe(async (status) => {
console.log(status)
if (status === 'TIMED_OUT') {
timed_out = true
}
Expand Down

0 comments on commit 7fb3da0

Please sign in to comment.