mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 22:09:08 +08:00
refactor(core): remove abort event error on init (#9465)
Following error always throw on Affine init, which is actually an `Event` from abort controller that can be handled in upstream. 
This commit is contained in:
@@ -100,11 +100,16 @@ export class Server extends Entity<{
|
||||
);
|
||||
|
||||
async waitForConfigRevalidation(signal?: AbortSignal) {
|
||||
this.revalidateConfig();
|
||||
await this.isConfigRevalidating$.waitFor(
|
||||
isRevalidating => !isRevalidating,
|
||||
signal
|
||||
);
|
||||
try {
|
||||
this.revalidateConfig();
|
||||
await this.isConfigRevalidating$.waitFor(
|
||||
isRevalidating => !isRevalidating,
|
||||
signal
|
||||
);
|
||||
} catch (error) {
|
||||
if (error instanceof Event && error.type === 'abort') return;
|
||||
console.error('Config revalidation failed:', error);
|
||||
}
|
||||
}
|
||||
|
||||
override dispose(): void {
|
||||
|
||||
Reference in New Issue
Block a user