Skip to content

Commit feac0af

Browse files
Merge pull request #3614 from wangeditor-team/fix-head-set-up
fix: 修复设置标题控制台报错的bug
2 parents 86cacb0 + f4680b2 commit feac0af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/menus/head/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class Head extends DropListMenu implements MenuActive {
3333
},
3434
],
3535
clickHandler: (value: string) => {
36+
if (editor.$textElem.html() === EMPTY_P) {
37+
return
38+
}
3639
// 注意 this 是指向当前的 Head 对象
3740
this.command(value)
3841
},

0 commit comments

Comments
 (0)