fix(view): fix inability to detect editor mode switching

This commit is contained in:
dragonish 2025-03-10 21:51:19 +08:00
parent 93c3c04610
commit 6bbdbf53aa
No known key found for this signature in database
GPG key ID: 6F42FA9E807A5177

View file

@ -67,9 +67,9 @@ export class HeadingViewPlugin implements PluginValue {
if (
update.docChanged ||
update.viewportChanged ||
update.transactions.some((tr) => {
tr.effects.some((e) => e.is(updateEditorMode));
})
update.transactions.some((tr) =>
tr.effects.some((e) => e.is(updateEditorMode))
)
) {
this.updateDecorations(
update.view,