瀏覽代碼

:art: https://github.com/siyuan-note/siyuan/issues/9888

Vanessa 1 年之前
父節點
當前提交
fd17c48e79
共有 2 個文件被更改,包括 7 次插入4 次删除
  1. 4 1
      app/src/protyle/render/av/relation.ts
  2. 3 3
      app/src/types/index.d.ts

+ 4 - 1
app/src/protyle/render/av/relation.ts

@@ -115,7 +115,10 @@ export const updateRelation = (options: {
     let colData: IAVColumn;
     options.colsData.find(item => {
         if (item.id === colId) {
-            colData = item
+            if (!item.relation) {
+                item.relation = {}
+            }
+            colData = item;
             return true;
         }
     })

+ 3 - 3
app/src/types/index.d.ts

@@ -1164,7 +1164,7 @@ interface IAVCellAssetValue {
 }
 
 interface IAVCellRelationValue {
-    avID: string
-    backKeyID: string
-    isTwoWay: boolean
+    avID?: string
+    backKeyID?: string
+    isTwoWay?: boolean
 }