Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 25faee0

Browse files
committed
fix: use async cryptoRandomString
1 parent 8d678ae commit 25faee0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/workerHelper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ export class WorkerHelper {
3535
}
3636
}
3737

38-
requestJob(jobType: string, textEditor: TextEditor) {
38+
async requestJob(jobType: string, textEditor: TextEditor) {
3939
if (!this.workerInstance) {
4040
throw new Error("Worker hasn't started");
4141
}
4242

43-
const emitKey = cryptoRandomString({ length: 10 });
43+
const emitKey = await cryptoRandomString.async({ length: 10 });
4444

4545
return new Promise((resolve, reject) => {
4646
const errSub = this.workerInstance.on('task:error', (...err) => {

0 commit comments

Comments
 (0)