Skip to content

Commit

Permalink
fix insertion IndexPath bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekTree0101 committed Jan 16, 2019
1 parent b791481 commit 92bc6d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VEditorKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'VEditorKit'
s.version = '1.2.3'
s.version = '1.2.4'
s.summary = 'Lightweight and Powerful Editor Kit'

s.description = 'Lightweight and Powerful Editor Kit built on Texture(AsyncDisplayKit)'
Expand Down
3 changes: 2 additions & 1 deletion VEditorKit/Classes/VEditorNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ open class VEditorNode: ASDisplayNode, ASTableDelegate, ASTableDataSource {
let contentIndexPaths: [IndexPath] = contents.enumerated().map({ index, _ -> IndexPath in
return .init(row: indexPath.row + 1 + index, section: indexPath.section)
})
let splitedTextIndexPath: IndexPath = .init(row: indexPath.row + 2, section: indexPath.section)
let splitedTextIndexPath: IndexPath = .init(row: (contentIndexPaths.last?.row ?? 0) + 1,
section: indexPath.section)

// STEP3: Fetch Placeholder or MediaContent with splitted text
self.tableNode.performBatchUpdates({
Expand Down

0 comments on commit 92bc6d9

Please sign in to comment.