Passed
Push — master ( 3ee46a...1315ad )
by Andreas
02:05
created

Menu/MenuItems/LiftListItemMenuItemDispatcher.js (1 issue)

Labels
Severity
1
import { liftListItem } from 'prosemirror-schema-list';
2
import AbstractMenuItemDispatcher from './AbstractMenuItemDispatcher';
3
import MenuItem from '../MenuItem';
4
import { svgIcon } from '../MDI';
5
6
export default class LiftListItemMenuItemDispatcher extends AbstractMenuItemDispatcher {
7
    static isAvailable(schema) {
8
        return !!schema.nodes.bullet_list || !!schema.nodes.ordered_list;
9
    }
10
11
    static getMenuItem(schema) {
12
        if (!this.isAvailable(schema)) {
13
            throw new Error('Lists are not available in the provided schema!');
14
        }
15
        return new MenuItem({
16
            icon: svgIcon('arrow-expand-left'),
17
            command: liftListItem(schema.nodes.list_item),
18
            label: LANG.plugins.prosemirror['label:liftLI'],
0 ignored issues
show
The variable LANG seems to be never declared. If this is a global, consider adding a /** global: LANG */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
19
        });
20
    }
21
}
22