diff --git a/src/index.ts b/src/index.ts index 2642f3d..2e9755d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,15 +21,14 @@ export const version = '__MEDIASOUP_CLIENT_AIORTC_VERSION__'; * Expose Worker factory. */ export async function createWorker( - { logLevel = 'error' }: - WorkerSettings = {} + { logLevel = 'error' }: WorkerSettings = {} ): Promise { logger.debug('createWorker()'); const worker = new Worker({ logLevel }); - return new Promise((resolve, reject) => + return new Promise((resolve, reject) => { worker.on('@success', () => resolve(worker)); worker.on('@failure', reject);