aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextMenu.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/RichTextMenu.tsx')
-rw-r--r--src/client/util/RichTextMenu.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/RichTextMenu.tsx b/src/client/util/RichTextMenu.tsx
index e367cf350..375c10da3 100644
--- a/src/client/util/RichTextMenu.tsx
+++ b/src/client/util/RichTextMenu.tsx
@@ -208,7 +208,7 @@ export default class RichTextMenu extends AntimodeMenu {
getMarksInSelection(state: EditorState<any>) {
const found = new Set<Mark>();
const { from, to } = state.selection as TextSelection;
- state.doc.nodesBetween(from, to, (node) => node.marks ?.forEach(m => found.add(m)));
+ state.doc.nodesBetween(from, to, (node) => node.marks.forEach(m => found.add(m)));
return found;
}
@@ -768,6 +768,6 @@ class ButtonDropdown extends React.Component<ButtonDropdownProps> {
<button className="dropdown-button antimodeMenu-button" onPointerDown={this.onDropdownClick}><FontAwesomeIcon icon="caret-down" size="sm" /></button>
{this.showDropdown ? this.props.dropdownContent : <></>}
</div>
- )
+ );
}
} \ No newline at end of file