Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(infra): reduce workspace avatar request (#6713)

EYHN236c6e00df2c
diff --git a/packages/common/infra/src/modules/workspace/entities/profile.ts b/packages/common/infra/src/modules/workspace/entities/profile.ts
index da7b9cee41..7e864ff671 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;