getPathWithNoTrailingSlash defaults
This commit is contained in:
1 parent
5ad84cd61e
commit
d8cf5c7525
1 file changed
+1
-1
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
function getPathWithNoTrailingSlash(path) {
|
function getPathWithNoTrailingSlash(path='') {
|
||||||
path = path.charAt(path.length - 1) === '/'
|
path = path.charAt(path.length - 1) === '/'
|
||||||
? path.substr(0, path.length - 1)
|
? path.substr(0, path.length - 1)
|
||||||
: path
|
: path
|
||||||
|
|||||||
Reference in new issue
Block a user