mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-03 18:40:00 +08:00
feat(core): new worker workspace engine (#9257)
This commit is contained in:
@@ -18,8 +18,11 @@ export class AwarenessSyncImpl implements AwarenessSync {
|
||||
|
||||
async update(record: AwarenessRecord, origin?: string) {
|
||||
await Promise.all(
|
||||
[this.storages.local, ...Object.values(this.storages.remotes)].map(peer =>
|
||||
peer.update(record, origin)
|
||||
[this.storages.local, ...Object.values(this.storages.remotes)].map(
|
||||
peer =>
|
||||
peer.connection.status === 'connected'
|
||||
? peer.update(record, origin)
|
||||
: Promise.resolve()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user