Skip to content

Commit

Permalink
fix #1594
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Aug 6, 2017
1 parent 9145498 commit e60ab1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ class Editor {
isBlank() {
if (this.scroll.children.length == 0) return true;
if (this.scroll.children.length > 1) return false;
let child = this.scroll.children.head;
return child.length() <= 1 && child instanceof Break;
let block = this.scroll.children.head;
if (block.statics.blotName !== Block.blotName) return false;
if (block.children.length > 1) return false;
return block.children.head instanceof Break;
}

removeFormat(index, length) {
Expand Down

0 comments on commit e60ab1b

Please sign in to comment.