Skip to content

Commit 276595e

Browse files
committed
fix: prevent dispatch on destroyed EditorView in CodeBlockHighlight
1 parent 5e78b2d commit 276595e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/extensions/markdown/CodeBlock/CodeBlockHighlight/CodeBlockHighlight.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ export const CodeBlockHighlight: ExtensionAuto<CodeBlockHighlightOptions> = (bui
8989
for (const alias of defs.aliases) {
9090
mapping[alias] = lang;
9191
}
92+
}
9293
}
93-
}
9494

95-
if (view && !view.isDestroyed) {
96-
view.dispatch(view.state.tr.setMeta(key, {modulesLoaded}));
95+
if (view && !view.isDestroyed) {
96+
view.dispatch(view.state.tr.setMeta(key, {modulesLoaded}));
97+
}
9798
}
98-
}
9999
});
100100
return getDecorations(state.doc);
101101
},

0 commit comments

Comments
 (0)