Update index.js

lint fixed
pull/5095/head
Cláudio Patrício 2023-05-04 13:51:03 +01:00 committed by GitHub
parent b396e718aa
commit 3e1133679b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -2,10 +2,13 @@ function convertPathToHtml(path) {
let htmlpath = ''
while (path.startsWith('../')) {
path = path.slice(3)
if (htmlpath.length < 2) htmlpath += '.'
else htmlpath += '/..'
if (htmlpath.length < 2) {
htmlpath += '.'
}
else {
htmlpath += '/..'
}
}
return htmlpath
}