Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
Handle block content items deletion
Hakan Shehu781351ce6f6b
diff --git a/desktop/src/lib/editor.ts b/desktop/src/lib/editor.tsindex ccc6ed1b..8747f405 100644--- a/desktop/src/lib/editor.ts+++ b/desktop/src/lib/editor.ts@@ -304,6 +304,11 @@ const applyBlockContentChangesToYDoc = (applyBlockContentItemChangesToYDoc(blockContentMap, blockContent);}}++ // delete any extra content items+ while (contentArray.length > block.content.length) {+ contentArray.delete(contentArray.length - 1);+ }};const applyBlockContentItemChangesToYDoc = (