feat: Intra-line double link interaction

This commit is contained in:
xiaodong zuo committed 2022-08-19 11:13:15 +08:00
1 parent dd1b160ef4
commit 2406f9556f
3 files changed
+57 -55

No files matched your search

@@ -508,21 +508,19 @@ export class AsyncBlock {
id: item.blockId,
});
if (linkBlock) {
let children = linkBlock.getProperties().text?.value || [];
if (children.length === 1 && !children[0].text) {
children = [{ text: 'Untitled' }];
}
if (
children.map(v => v.text).join('') !==
(item.children || []).map((v: any) => v.text).join('')
) {
const newItem = {
...item,
children: children,
};
values.splice(i, 1, newItem);
}
let children = linkBlock?.getProperties().text?.value || [];
if (children.length === 1 && !children[0].text) {
children = [{ text: 'Untitled' }];
}
if (
children.map(v => v.text).join('') !==
(item.children || []).map((v: any) => v.text).join('')
) {
const newItem = {
...item,
children: children,
};
values.splice(i, 1, newItem);
}
}
}