From c36e4c3afc0883ff1310b8ea5338fadcb0f71f4b Mon Sep 17 00:00:00 2001 From: Mark Hemmings Date: Wed, 14 Aug 2024 19:50:11 +0100 Subject: [PATCH] fix: Use undefined for type attribute default (#5491) --- .changeset/ordered-list-type-attr-undefined.md | 5 +++++ packages/extension-ordered-list/src/ordered-list.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/ordered-list-type-attr-undefined.md diff --git a/.changeset/ordered-list-type-attr-undefined.md b/.changeset/ordered-list-type-attr-undefined.md new file mode 100644 index 00000000000..90c3a6e126c --- /dev/null +++ b/.changeset/ordered-list-type-attr-undefined.md @@ -0,0 +1,5 @@ +--- +"@tiptap/extension-ordered-list": patch +--- + +fix: Use undefined for type attribute default diff --git a/packages/extension-ordered-list/src/ordered-list.ts b/packages/extension-ordered-list/src/ordered-list.ts index 1f9f4f975aa..ed2a4590419 100644 --- a/packages/extension-ordered-list/src/ordered-list.ts +++ b/packages/extension-ordered-list/src/ordered-list.ts @@ -85,7 +85,7 @@ export const OrderedList = Node.create({ }, }, type: { - default: null, + default: undefined, parseHTML: element => element.getAttribute('type'), }, }