Browse Source

Update index.js

lint fixed
Cláudio Patrício 1 year ago
parent
commit
3e1133679b
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/utils/index.js

+ 6 - 3
src/utils/index.js

@@ -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
 }