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

Commit

Permalink
fix: use async cryptoRandomString
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Apr 5, 2021
1 parent 8d678ae commit 25faee0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/workerHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export class WorkerHelper {
}
}

requestJob(jobType: string, textEditor: TextEditor) {
async requestJob(jobType: string, textEditor: TextEditor) {
if (!this.workerInstance) {
throw new Error("Worker hasn't started");
}

const emitKey = cryptoRandomString({ length: 10 });
const emitKey = await cryptoRandomString.async({ length: 10 });

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

0 comments on commit 25faee0

Please sign in to comment.