Skip to content

Commit

Permalink
Call normalize node with options
Browse files Browse the repository at this point in the history
  • Loading branch information
eriksson-daniel committed Nov 29, 2024
1 parent b63709b commit ec5c734
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/plate/plugins/normalize-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export const normalizeNodePlugin = createPlatePlugin({
const { normalizeNode } = editor;

// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: ¯\_(ツ)_/¯
editor.normalizeNode = ([node, path]) => {
editor.normalizeNode = ([node, path], opts) => {
if (!isElement(node)) {
return normalizeNode([node, path]);
return normalizeNode([node, path], opts);
}

if (node.type === undefined) {
Expand Down Expand Up @@ -149,7 +149,7 @@ export const normalizeNodePlugin = createPlatePlugin({
LogLevel.ERROR,
);

return normalizeNode([node, path]);
return normalizeNode([node, path], opts);
}

if (node.children.length === 0) {
Expand Down Expand Up @@ -196,7 +196,7 @@ export const normalizeNodePlugin = createPlatePlugin({
}
}

normalizeNode([node, path]);
normalizeNode([node, path], opts);
};

return editor;
Expand Down

0 comments on commit ec5c734

Please sign in to comment.