From 5e97efab3a62352a097ba834f527f40635128b5e Mon Sep 17 00:00:00 2001 From: DarkSky Date: Mon, 15 Aug 2022 18:24:47 +0800 Subject: [PATCH] fix: async provider --- libs/datasource/jwt/src/adapter/yjs/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/datasource/jwt/src/adapter/yjs/index.ts b/libs/datasource/jwt/src/adapter/yjs/index.ts index ef7e481a42..ec201c2d84 100644 --- a/libs/datasource/jwt/src/adapter/yjs/index.ts +++ b/libs/datasource/jwt/src/adapter/yjs/index.ts @@ -78,7 +78,7 @@ async function _initYjsDatabase( await _waitLoading(workspace); } const instance = _yjsDatabaseInstance.get(workspace); - // tTODO:odo temporarily handle this + // TODO: temporarily handle this if ( instance && (instance.userId === options.userId || options.userId === 'default') @@ -110,7 +110,7 @@ async function _initYjsDatabase( const emitState = (c: Connectivity) => connListener.listeners?.(workspace, c); await Promise.all( - Object.entries(options.provider).flatMap(async ([, p]) => [ + Object.entries(options.provider).flatMap(([, p]) => [ p({ awareness, doc, token, workspace, emitState }), p({ awareness,