mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) prefer const
This commit is contained in:
parent
b62984d540
commit
040b2c2914
4 changed files with 5 additions and 6 deletions
|
|
@ -40,7 +40,7 @@ const loadRemote = require('./load-remote');
|
|||
const selectByPattern = require('./select-by-pattern');
|
||||
|
||||
function CmdProto() {
|
||||
let CurrentInfo = {};
|
||||
const CurrentInfo = {};
|
||||
|
||||
const Cmd = this;
|
||||
const SELECTED_FILE = 'selected-file';
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ function beforeShow(callback, params) {
|
|||
const {
|
||||
name
|
||||
} = params;
|
||||
let el = DOM.getCurrentByPosition({
|
||||
const el = DOM.getCurrentByPosition({
|
||||
x: params.x,
|
||||
y: params.y
|
||||
});
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ function deleteSilent(files = DOM.getActiveFiles()) {
|
|||
const names = Info.files.map(DOM.getCurrentName);
|
||||
const isCurrent = names.includes(currentName);
|
||||
|
||||
let name = isCurrent ? currentName : nextCurrentName;
|
||||
const name = isCurrent ? currentName : nextCurrentName;
|
||||
|
||||
DOM.setCurrentByName(name);
|
||||
});
|
||||
|
|
@ -289,7 +289,6 @@ function _processFiles(options, data) {
|
|||
let files;
|
||||
let panel;
|
||||
let shouldAsk;
|
||||
let sameName;
|
||||
let ok;
|
||||
|
||||
let from = '';
|
||||
|
|
@ -317,7 +316,7 @@ function _processFiles(options, data) {
|
|||
|
||||
const name = names[0];
|
||||
|
||||
sameName = DOM.getCurrentByName(name, panel);
|
||||
const sameName = DOM.getCurrentByName(name, panel);
|
||||
|
||||
if (!data && noFilesCheck())
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ module.exports.findObjByNameInArr = (array, name) => {
|
|||
throw Error('name should be string!');
|
||||
|
||||
array.some((item) => {
|
||||
let is = item.name === name;
|
||||
const is = item.name === name;
|
||||
const isArray = Array.isArray(item);
|
||||
|
||||
if (is) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue