halo/ui/packages
Takagi f40014d005
fix: error occurs when the link is purely numerical (#5479)
#### What type of PR is this?

/kind bug
/area editor
/area ui
/milestone 2.14.x

#### What this PR does / why we need it:

在默认的富文本编辑器中,使用了 [tiptap link](b3ef574f3d/packages/extension-link/src/link.ts (L127C3-L135C5)) ,而其中的 renderHTML 会对 href 进行处理,但当链接为纯数字的时候,`HTMLAttributes.href` 将不会有 `startsWith` 方法。

此 PR 将在解析 renderHTML 时,将 `HTMLAttributes.href` 转为 string,进而解决这个问题。

#### How to test it?

测试使用默认富文本编辑器时,编写一个链接,并将其设置为纯数字。
刷新页面,查看是否具有报错。

#### Which issue(s) this PR fixes:

Fixes #5478 

#### Does this PR introduce a user-facing change?
```release-note
解决在默认富文本编辑器中当链接为纯数字时报错的问题
```
2024-03-14 05:06:07 +00:00
..
api-client refactor: optimize reply queries using index mechanisms (#5497) 2024-03-13 08:44:08 +00:00
components Prepare for developing 2.14 (#5448) 2024-03-06 03:04:07 +00:00
editor fix: error occurs when the link is purely numerical (#5479) 2024-03-14 05:06:07 +00:00
shared Prepare for developing 2.14 (#5448) 2024-03-06 03:04:07 +00:00
ui-plugin-bundler-kit Prepare for developing 2.14 (#5448) 2024-03-06 03:04:07 +00:00