From 3b6d27948d7a42a11dcc469362bd3478f69f431e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Thu, 18 May 2023 22:12:45 +0100 Subject: [PATCH] chore: use url format for request id --- src/util/WorkerEventBus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/WorkerEventBus.ts b/src/util/WorkerEventBus.ts index e94b46a..368990b 100644 --- a/src/util/WorkerEventBus.ts +++ b/src/util/WorkerEventBus.ts @@ -47,7 +47,7 @@ export class WorkerClientBus { async request(actionName: T, payload: P): Promise { return new Promise((resolve, reject) => { - const id = nanoid(); + const id = `request://${actionName}/${nanoid()}`; this.idPromiseMap.set(id, [resolve, reject]); this.worker.postMessage({ id,