mirror of
https://github.com/outline/outline.git
synced 2026-11-22 22:02:35 +03:00
fix: RangeError: Position -1 out of range
This commit is contained in:
1 parent
03869784be
commit
ea97963feb
1 file changed
+6
-3
@@ -186,9 +186,12 @@ function SuggestionsMenu<T extends MenuItem>(props: Props<T>) {
|
||||
dispatch(
|
||||
state.tr.insertText(
|
||||
"",
|
||||
state.selection.from -
|
||||
(props.search ?? "").length -
|
||||
(trimTrigger ? props.trigger.length : 0),
|
||||
Math.max(
|
||||
0,
|
||||
state.selection.from -
|
||||
(props.search ?? "").length -
|
||||
(trimTrigger ? props.trigger.length : 0)
|
||||
),
|
||||
state.selection.to
|
||||
)
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user