Skip to content

Commit 3d36f20

Browse files
committed
fix(code-block-shiki): decorations parse error
1 parent f98f89d commit 3d36f20

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/tiptap-extension-code-block-shiki/src/codeBlockShiki.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ export const codeBlockShiki = CodeBlock.extend<CodeBlockShikiOptions, CodeBlockS
6666
})
6767
}
6868

69-
// @ts-expect-error mapping
7069
return decorationSet.map(transaction.mapping, transaction.doc)
7170
},
7271
},
7372
props: {
74-
// @ts-expect-error mapping
7573
decorations(state) {
76-
return this.getState(state)!
74+
return this.getState(state)
7775
},
7876
},
7977
}),
@@ -155,7 +153,7 @@ function getDecorations({
155153
}) {
156154
let decorations: Decoration[] = []
157155
if (!highlighter)
158-
return decorations
156+
return DecorationSet.create(doc, decorations)
159157

160158
findChildren(doc, node => node.type.name === name).forEach((block) => {
161159
// @ts-expect-error language

0 commit comments

Comments
 (0)