Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 7fb3da0

Browse files
authored
fix: Access token callback can return null (#440)
1 parent e70fa7e commit 7fb3da0

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/RealtimeClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default class RealtimeClient {
112112
message: [],
113113
}
114114
fetch: Fetch
115-
accessToken: (() => Promise<string>) | null = null
115+
accessToken: (() => Promise<string | null>) | null = null
116116
worker?: boolean
117117
workerUrl?: string
118118
workerRef?: Worker

test/channel.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,6 @@ describe('send', () => {
12031203
const pushStub = sinon.stub(new_channel, '_push')
12041204

12051205
new_channel.subscribe(async (status) => {
1206-
console.log(status)
12071206
if (status === 'SUBSCRIBED') {
12081207
subscribed = true
12091208
await new_channel.send({ type: 'broadcast', event: 'test' })
@@ -1232,7 +1231,6 @@ describe('send', () => {
12321231
const pushStub = sinon.stub(new_channel, '_push')
12331232

12341233
new_channel.subscribe(async (status) => {
1235-
console.log(status)
12361234
if (status === 'TIMED_OUT') {
12371235
timed_out = true
12381236
}

0 commit comments

Comments
 (0)