mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
refactor(cloudfunc) getSize: regexp
This commit is contained in:
parent
dbbeb063e7
commit
5fb5652f3d
1 changed files with 1 additions and 1 deletions
|
|
@ -244,7 +244,7 @@ function getSize(file) {
|
|||
type,
|
||||
} = file;
|
||||
|
||||
if (type === 'directory')
|
||||
if (/^directory$/.test(type))
|
||||
return '<dir>';
|
||||
|
||||
if (/link/.test(type))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue