Completed
Push — master ( 1315ad...572de6 )
by Andreas
13s queued 11s
created

UndoMenuItemDispatcher   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A getMenuItem 0 7 1
A isAvailable 0 3 1
1
import { undo } from 'prosemirror-history';
2
import AbstractMenuItemDispatcher from './AbstractMenuItemDispatcher';
3
import { svgIcon } from '../MDI';
4
import MenuItem from '../MenuItem';
5
6
export default class UndoMenuItemDispatcher extends AbstractMenuItemDispatcher {
7
    // history should be available regardless of current schema
8
    static isAvailable() {
9
        return true;
10
    }
11
12
    static getMenuItem() {
13
        return new MenuItem({
14
            command: undo,
15
            icon: svgIcon('undo'),
16
            label: LANG.plugins.prosemirror['label:undo'],
0 ignored issues
show
Bug introduced by
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...
17
        });
18
    }
19
}
20