getPathWithNoTrailingSlash defaults

This commit is contained in:
tmshv committed 2019-08-01 14:36:37 +03:00
1 parent 5ad84cd61e
commit d8cf5c7525
1 file changed
+1 -1
+1 -1
View File
@@ -1,4 +1,4 @@
function getPathWithNoTrailingSlash(path) {
function getPathWithNoTrailingSlash(path='') {
path = path.charAt(path.length - 1) === '/'
? path.substr(0, path.length - 1)
: path