Skip to content

Commit

Permalink
Insert card after the current section not before
Browse files Browse the repository at this point in the history
  • Loading branch information
mixonic committed Oct 20, 2015
1 parent 9aa400c commit e16a3b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/components/content-kit-editor/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ export default Component.extend({
if (editMode) {
editor.editCard(card);
}
postEditor.insertSectionBefore(editor.post.sections, card, section);
let nextSection = section && section.next;
postEditor.insertSectionBefore(editor.post.sections, card, nextSection);
if (section && section.isBlank) {
postEditor.removeSection(section);
}
Expand Down

0 comments on commit e16a3b7

Please sign in to comment.