|
|
@@ -377,7 +377,7 @@ function onMergePrevious(index: number) {
|
|
|
// block objects in result.blocks might have stale content, causing the
|
|
|
// debounced watch in Block.vue to re-apply the old value and lose state.
|
|
|
const prevIndex = result.blocks.findIndex((b) => b.id === prev.id)
|
|
|
- if (prevIndex !== -1) result.blocks[prevIndex].content = result.mergedContent
|
|
|
+ if (prevIndex !== -1) result.blocks[prevIndex]!.content = result.mergedContent
|
|
|
|
|
|
blocks.value = result.blocks
|
|
|
onBlockContentChange()
|
|
|
@@ -533,6 +533,7 @@ function onZoneActivate(index: number, content: string) {
|
|
|
let firstInsertRecorded = false
|
|
|
for (let i = 0; i < lines.length; i++) {
|
|
|
const line = lines[i]
|
|
|
+ if (line === undefined) continue
|
|
|
if (line === "" && i < lines.length - 1) continue
|
|
|
const result = opInsertBlock(
|
|
|
blocks.value,
|