Skip to content

Commit 9e8c6b3

Browse files
authored
Fix event key checking wrong var when picking up from environment (#53)
The event key here is erroneously checking the event key given to the instantiation instead of the end result of using either this event key or one found in the environment.
1 parent c5c6062 commit 9e8c6b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Inngest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class Inngest<Events extends Record<string, EventPayload>> {
104104
this.inngestBaseUrl = new URL(inngestBaseUrl);
105105
this.inngestApiUrl = new URL(`e/${this.eventKey}`, this.inngestBaseUrl);
106106

107-
if (!eventKey) {
107+
if (!this.eventKey) {
108108
throw new Error(
109109
"An event key must be passed to create an Inngest instance."
110110
);

0 commit comments

Comments
 (0)