diff --git a/src/editor/StrudelPlugin.ts b/src/editor/StrudelPlugin.ts index 294a1a7..4ade463 100644 --- a/src/editor/StrudelPlugin.ts +++ b/src/editor/StrudelPlugin.ts @@ -14,6 +14,8 @@ const findBlocks = ( ): StrudelBlockInfo[] => { const blocks: StrudelBlockInfo[] = [] + if (state.doc.length === 0) return blocks + if (from === to) return blocks const startLine = state.doc.lineAt(from)