lint
This commit is contained in:
@@ -40,11 +40,11 @@ type Props = {
|
|||||||
view: EditorView;
|
view: EditorView;
|
||||||
};
|
};
|
||||||
|
|
||||||
function isVisible(props: Props, link: boolean) {
|
function isVisible(props: Props) {
|
||||||
const { view } = props;
|
const { view } = props;
|
||||||
const { selection } = view.state;
|
const { selection } = view.state;
|
||||||
|
|
||||||
if (link) {
|
if (isMarkActive(view.state.schema.marks.link)(view.state)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!selection || selection.empty) {
|
if (!selection || selection.empty) {
|
||||||
@@ -239,7 +239,7 @@ export default class SelectionToolbar extends React.Component<Props> {
|
|||||||
return (
|
return (
|
||||||
<FloatingToolbar
|
<FloatingToolbar
|
||||||
view={view}
|
view={view}
|
||||||
active={isVisible(this.props, link)}
|
active={isVisible(this.props)}
|
||||||
ref={this.menuRef}
|
ref={this.menuRef}
|
||||||
>
|
>
|
||||||
{link && range ? (
|
{link && range ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user