use (root) as folder name in case two requests are present under the / path

This commit is contained in:
Damien Pitard
2019-07-08 12:09:45 +02:00
parent 5492bea8e4
commit acbf12ca34

View File

@@ -299,7 +299,7 @@ module.exports = {
// split the path into indiv. segments for trie generation
// unless path it the root endpoint
currentPath = path === '' ? [''] : path.split('/').filter((pathItem) => {
currentPath = path === '' ? ['(root)'] : path.split('/').filter((pathItem) => {
// remove any empty pathItems that might have cropped in
// due to trailing or double '/' characters
return pathItem !== '';