Skip to content

Commit 10ce81c

Browse files
authored
fix(SelectionContext): fixed ESM import error for prosemirror-utils (#771)
1 parent b63e08f commit 10ce81c

File tree

1 file changed

+3
-1
lines changed
  • src/extensions/behavior/SelectionContext

1 file changed

+3
-1
lines changed

src/extensions/behavior/SelectionContext/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import {keydownHandler} from 'prosemirror-keymap';
2+
import type {Node} from 'prosemirror-model';
23
import {
34
AllSelection,
45
type EditorState,
56
Plugin,
67
type PluginSpec,
78
TextSelection,
89
} from 'prosemirror-state';
10+
// @ts-ignore // TODO: fix cjs build
911
import {hasParentNode} from 'prosemirror-utils';
1012
import type {EditorProps, EditorView} from 'prosemirror-view';
1113

@@ -143,7 +145,7 @@ class SelectionTooltip implements PluginSpec<unknown> {
143145
isCodeBlock(selection.$from.parent) ||
144146
isCodeBlock(selection.$to.parent) ||
145147
// or when selection is inside node where context menu is disabled
146-
hasParentNode((node) => node.type.spec.selectionContext === false)(selection)
148+
hasParentNode((node: Node) => node.type.spec.selectionContext === false)(selection)
147149
) {
148150
this.tooltip.hide(view);
149151
return;

0 commit comments

Comments
 (0)