There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
chore: clean code
lawvs6ef0e5e567fa
diff --git a/libs/components/editor-core/src/recast-block/Context.tsx b/libs/components/editor-core/src/recast-block/Context.tsxindex b819d20f2a..55d334039b 100644--- a/libs/components/editor-core/src/recast-block/Context.tsx+++ b/libs/components/editor-core/src/recast-block/Context.tsx@@ -16,6 +16,18 @@ export const isRecastBlock = (block: unknown): block is RecastBlock => {);};+/**+ * Remove legacy properties+ */+const normalizeRecastBlockData = (block: RecastBlock) => {+ if (block.getProperty('scene')) {+ block.removeProperty('scene');+ }+ if (block.getProperty('kanbanProps')) {+ block.removeProperty('kanbanProps');+ }+};+export const RecastBlockContext = createContext<RecastBlock | null>(null);export const RecastBlockProvider = ({@@ -31,6 +43,8 @@ export const RecastBlockProvider = ({);}+ normalizeRecastBlockData(block);+return (<RecastBlockContext.Provider value={block}>{children}diff --git a/libs/components/editor-core/src/render-block/RenderBlock.tsx b/libs/components/editor-core/src/render-block/RenderBlock.tsxindex 4fa6435bf7..46f068af2b 100644--- a/libs/components/editor-core/src/render-block/RenderBlock.tsx+++ b/libs/components/editor-core/src/render-block/RenderBlock.tsx@@ -49,7 +49,6 @@ export const RenderBlock: FC<RenderBlockProps> = ({block={block}columns={columns.columns}columnsFromId={columns.fromId}- scene="page"editorElement={editorElement}/>) : null;