diff --git a/package-lock.json b/package-lock.json index fb36858..a5a7fb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "extended-eventsource", - "version": "1.0.0", + "version": "1.5.2", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 152229b..a6331b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "extended-eventsource", - "version": "1.5.1", + "version": "1.5.2", "author": "Lukas Reining", "readme": "README.md", "description": "Spec compliant EventSource implementation for browsers and Node.JS", diff --git a/src/eventsource.ts b/src/eventsource.ts index e7df5fe..0dc0ff6 100644 --- a/src/eventsource.ts +++ b/src/eventsource.ts @@ -45,7 +45,7 @@ export class CustomEventSource extends EventTarget implements EventSource { constructor( url: string | URL, initDict?: EventSourceInit & EventSourceOptions, - { inputFetch } = { inputFetch: globalThis.fetch }, + { inputFetch } = { inputFetch: globalThis.fetch.bind(globalThis) }, ) { super(); this.fetch = inputFetch;