mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Koenig - Fix error on backspace with heading as first section
This commit is contained in:
parent
8b75b37c7b
commit
4753f92fe1
1 changed files with 1 additions and 1 deletions
|
@ -659,7 +659,7 @@ export default Component.extend({
|
|||
|
||||
// if cursor is at the beginning of a heading and previous section is a
|
||||
// blank paragraph, delete the blank paragraph
|
||||
if (isCollapsed && offset === 0 && section.tagName.match(/^h\d$/) && section.prev.tagName === 'p' && section.prev.isBlank) {
|
||||
if (isCollapsed && offset === 0 && section.tagName.match(/^h\d$/) && section.prev && section.prev.tagName === 'p' && section.prev.isBlank) {
|
||||
editor.run((postEditor) => {
|
||||
postEditor.removeSection(section.prev);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue