mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(cloudfunc) rmLastSlash: remove even when str consist of one slash
This commit is contained in:
parent
86db4b273e
commit
bc4945f804
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ var Util;
|
|||
lastSlash = path.lastIndexOf('/');
|
||||
isEqual = lastSlash === length;
|
||||
|
||||
if (isStr && isEqual)
|
||||
if (length && isStr && isEqual)
|
||||
path = path.substr(path, length);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue