Skip to content

Commit f4680b2

Browse files
committed
fix: 修复设置标题控制台报错的bug
1 parent 86cacb0 commit f4680b2

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)