From 236c6e00df2cff6330b58d7f39a878901baddbe5 Mon Sep 17 00:00:00 2001 From: EYHN Date: Sun, 28 Apr 2024 07:06:27 +0000 Subject: [PATCH] fix(infra): reduce workspace avatar request (#6713) --- .../common/infra/src/modules/workspace/entities/profile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/common/infra/src/modules/workspace/entities/profile.ts b/packages/common/infra/src/modules/workspace/entities/profile.ts index da7b9cee4..7e864ff67 100644 --- a/packages/common/infra/src/modules/workspace/entities/profile.ts +++ b/packages/common/infra/src/modules/workspace/entities/profile.ts @@ -1,5 +1,5 @@ import { DebugLogger } from '@affine/debug'; -import { catchError, EMPTY, mergeMap, switchMap } from 'rxjs'; +import { catchError, EMPTY, exhaustMap, mergeMap } from 'rxjs'; import { Entity } from '../../../framework'; import { @@ -59,7 +59,7 @@ export class WorkspaceProfile extends Entity<{ metadata: WorkspaceMetadata }> { } revalidate = effect( - switchMap(() => { + exhaustMap(() => { const provider = this.provider; if (!provider) { return EMPTY;