mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
chore(dom) getAllFiles: es2015-ify
This commit is contained in:
parent
6681d17624
commit
44aa8ed11b
1 changed files with 6 additions and 9 deletions
|
|
@ -599,16 +599,13 @@ function CmdProto() {
|
|||
return Cmd;
|
||||
};
|
||||
|
||||
this.getAllFiles = function() {
|
||||
var i,
|
||||
panel = DOM.getPanel(),
|
||||
files = DOM.getFiles(panel),
|
||||
name = DOM.getCurrentName(files[0]);
|
||||
this.getAllFiles = () => {
|
||||
const panel = DOM.getPanel();
|
||||
const files = DOM.getFiles(panel);
|
||||
const name = DOM.getCurrentName(files[0]);
|
||||
|
||||
if (name === '..')
|
||||
i = 1;
|
||||
else
|
||||
i = 0;
|
||||
const from = (a) => a === '..' ? 1 : 0;
|
||||
const i = from('..');
|
||||
|
||||
return [].slice.call(files, i);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue