Skip to content

Commit ecae723

Browse files
committed
Remove run-time error
1 parent e08d056 commit ecae723

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,8 @@ export class Connection {
186186
private url: string
187187

188188
constructor(config: Config) {
189-
if (!config.fetch && typeof fetch === 'undefined') {
190-
throw new Error('No `fetch` implementation available')
191-
}
192-
193-
this.config = { ...config }
194-
this.fetch = config.fetch || fetch
189+
this.config = config
190+
this.fetch = config.fetch || fetch!
195191
this.session = null
196192

197193
if (config.url) {

0 commit comments

Comments
 (0)