fix: another attempt to migrate empty document fields (#7004)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2024-10-21 15:02:22 +07:00
committed by GitHub
parent 996978ef26
commit f06a6e2bc8
10 changed files with 65 additions and 56 deletions
@@ -415,7 +415,7 @@ async function getCreateReferencesTxes (
} else if (attr.type._class === core.class.TypeCollaborativeDoc) {
const collaborativeDoc = (createdDoc as any)[attr.name] as CollaborativeDoc
try {
const ydoc = await loadCollaborativeDoc(storage, control.workspace, collaborativeDoc, control.ctx)
const ydoc = await loadCollaborativeDoc(ctx, storage, control.workspace, collaborativeDoc)
if (ydoc !== undefined) {
const attrReferences = getReferencesData(
srcDocId,
@@ -467,7 +467,7 @@ async function getUpdateReferencesTxes (
hasReferenceAttrs = true
try {
const collaborativeDoc = (updatedDoc as any)[attr.name] as CollaborativeDoc
const ydoc = await loadCollaborativeDoc(storage, control.workspace, collaborativeDoc, control.ctx)
const ydoc = await loadCollaborativeDoc(ctx, storage, control.workspace, collaborativeDoc)
if (ydoc !== undefined) {
const attrReferences = getReferencesData(
srcDocId,