Browse Source

fixed lint

Cláudio Patrício 1 year ago
parent
commit
5aca6b1082
1 changed files with 2 additions and 6 deletions
  1. 2 6
      src/utils/index.js

+ 2 - 6
src/utils/index.js

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