mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-24 04:56:48 +08:00
Bug fix
This commit is contained in:
@@ -14,7 +14,9 @@ export const handler: Handlers<Task[]> = {
|
||||
const handle = (
|
||||
e: CustomEvent<Task | TaskProgress | { task: Task; error: string }>,
|
||||
) => {
|
||||
socket.send(JSON.stringify({ type: e.type, detail: e.detail }));
|
||||
if (socket.readyState === socket.OPEN) {
|
||||
socket.send(JSON.stringify({ type: e.type, detail: e.detail }));
|
||||
}
|
||||
};
|
||||
const close_handle = () => {
|
||||
sendMessage({ type: "close" });
|
||||
|
||||
Reference in New Issue
Block a user