Skip to content

Commit

Permalink
[DEV-19138] Drop remnants of the .serialize() method
Browse files Browse the repository at this point in the history
  • Loading branch information
e1himself committed Jan 15, 2025
1 parent 5889c53 commit 4eafb13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions packages/slate-editor/src/modules/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -846,9 +846,7 @@ export const Editor = forwardRef<EditorRef, EditorProps>((props, forwardedRef) =
const hasCustomPlaceholder =
withFloatingAddMenu && (isEditorFocused(editor) || isFloatingAddMenuOpen);

const onChange = useOnChange((value) => {
props.onChange(editor.serialize(value) as Value);
});
const onChange = useOnChange(props.onChange);

const floatingSnippetRenderInput = useFunction(() => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function isEditorValueEqual<T extends Descendant>(
);
}

return a === b || compareLists(editor.serialize(a), editor.serialize(b));
return a === b || compareLists(a, b);
}

function isText(node: Descendant): node is Text {
Expand Down

0 comments on commit 4eafb13

Please sign in to comment.