fix: clear codacy object injection highs

This commit is contained in:
lucaronin
2026-05-07 20:44:45 +02:00
parent 8d35fbcba3
commit 5965d5f23f
98 changed files with 952 additions and 559 deletions

View File

@@ -70,7 +70,7 @@ function replaceCompletedInlineMath(
trailingText?: string,
): EditorViewLike['state']['tr'] | null {
const replacement = readInlineMathReplacement(view)
const mathNodeType = view.state.schema.nodes[MATH_INLINE_TYPE]
const mathNodeType = Reflect.get(view.state.schema.nodes, MATH_INLINE_TYPE) as EditorViewLike['state']['schema']['nodes'][string] | undefined
if (!replacement || !mathNodeType) return null
const mathNode = mathNodeType.createChecked({ latex: replacement.latex })