Skip to content

Commit 11954e5

Browse files
filipecabacoabc3
andauthored
Update src/RealtimeChannel.ts
Co-authored-by: Stas <[email protected]>
1 parent 3ea02c9 commit 11954e5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/RealtimeChannel.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,8 @@ export default class RealtimeChannel {
464464
)
465465

466466
if (response.ok) {
467-
await response.body?.cancel()
468-
return 'ok'
469-
} else {
470-
await response.body?.cancel()
471-
return 'error'
467+
await response.body?.cancel()
468+
return response.ok ? 'ok' : 'error'
472469
}
473470
} catch (error: any) {
474471
if (error.name === 'AbortError') {

0 commit comments

Comments
 (0)