Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat: Intra-line double link interaction

xiaodong zuob53581aae5da
diff --git a/libs/components/common/src/lib/text/slate-utils.ts b/libs/components/common/src/lib/text/slate-utils.ts
index 476883a2c9..fd1de5f674 100644
--- a/libs/components/common/src/lib/text/slate-utils.ts
+++ b/libs/components/common/src/lib/text/slate-utils.ts
@@ -11,6 +11,7 @@ import {
Transforms,
} from 'slate';
import { ReactEditor } from 'slate-react';
+import type { CustomElement } from '..';
import {
fontBgColorPalette,
fontColorPalette,
@@ -597,7 +598,7 @@ class SlateUtils {
const fragmentChildren = firstFragment.children;
- const textChildren = [];
+ const textChildren: CustomElement[] = [];
for (let i = 0; i < fragmentChildren.length; i++) {
const child = fragmentChildren[i];
if ('type' in child && child.type === 'link') {