Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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](https://github.com/ueberdosis/tiptap/blob/b3ef574f3dd92852bc4dac24a82eb360db96c9c3/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 解决在默认富文本编辑器中当链接为纯数字时报错的问题 ```
- Loading branch information