Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: hard code tag (#154)
Browse files Browse the repository at this point in the history
Using the constructor name is unreliable since it can be changed by code minifiers.
  • Loading branch information
achingbrain committed May 6, 2022
1 parent 20567c4 commit c36aebb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ export interface WebSocketsInit extends AbortOptions, WebSocketOptions {
}

export class WebSockets implements Transport {
static tag = 'WebSockets'

private readonly init?: WebSocketsInit

constructor (init?: WebSocketsInit) {
this.init = init
}

get [Symbol.toStringTag] () {
return this.constructor.name
return WebSockets.tag
}

get [symbol] (): true {
Expand Down

0 comments on commit c36aebb

Please sign in to comment.