fix: two tabs refresh cause empty graph

This commit is contained in:
hjlarry 2026-04-10 10:55:13 +08:00
parent 7eb1c026a2
commit 692bf7ced1

View File

@ -1335,6 +1335,9 @@ export class CollaborationManager {
return
try {
if (this.getNodes().length === 0 && this.getEdges().length === 0)
return
const snapshot = this.doc.export({ mode: 'snapshot' })
this.sendGraphEvent(snapshot)
}