mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
chore(cloudcmd) lint: indexOf -> includes
This commit is contained in:
parent
c30bc69f5d
commit
8bb746aa0e
8 changed files with 14 additions and 26 deletions
|
|
@ -170,9 +170,7 @@ function getMenuData() {
|
|||
'Select All Ctrl+A' : () => {
|
||||
editor.selectAll();
|
||||
},
|
||||
'Close Esc' : () => {
|
||||
hide();
|
||||
},
|
||||
'Close Esc' : hide,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -195,9 +195,7 @@ function setMenu(event) {
|
|||
'Select All Ctrl+A' : () => {
|
||||
editor.selectAll();
|
||||
},
|
||||
'Close Esc' : () => {
|
||||
hide();
|
||||
},
|
||||
'Close Esc' : hide,
|
||||
};
|
||||
|
||||
const element = CloudCmd.Edit.getElement();
|
||||
|
|
|
|||
|
|
@ -225,13 +225,9 @@ Operation.move = processFiles({
|
|||
type: 'move',
|
||||
});
|
||||
|
||||
Operation.delete = () => {
|
||||
promptDelete();
|
||||
};
|
||||
Operation.delete = promptDelete;
|
||||
|
||||
Operation.deleteSilent = () => {
|
||||
deleteSilent();
|
||||
};
|
||||
Operation.deleteSilent = deleteSilent;
|
||||
|
||||
Operation.pack = () => {
|
||||
const isZip = config('packer') === 'zip';
|
||||
|
|
|
|||
|
|
@ -355,8 +355,8 @@ function setCurrentByPosition(position) {
|
|||
filesPassive,
|
||||
} = Info;
|
||||
|
||||
const isFiles = ~files.indexOf(element);
|
||||
const isFilesPassive = ~filesPassive.indexOf(element);
|
||||
const isFiles = files.includes(element);
|
||||
const isFilesPassive = filesPassive.includes(element);
|
||||
|
||||
if (!isFiles && !isFilesPassive)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue