Skip to content

Commit

Permalink
remove redundant event source logic (#8211)
Browse files Browse the repository at this point in the history
* remove redundant event source logic

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
hannahblair and gradio-pr-bot committed May 3, 2024
1 parent b9afe93 commit 91b5cd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .changeset/gold-frogs-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/client": minor
"gradio": minor
---

feat:remove redundant event source logic
10 changes: 0 additions & 10 deletions client/js/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ export class NodeBlob extends Blob {
}
}

if (typeof window === "undefined") {
import("eventsource")
.then((EventSourceModule) => {
global.EventSource = EventSourceModule.default as any;
})
.catch((error) =>
console.error("Failed to load EventSource module:", error)
);
}

export class Client {
app_reference: string;
options: ClientOptions;
Expand Down

0 comments on commit 91b5cd6

Please sign in to comment.