瀏覽代碼

fixed lint

Cláudio Patrício 1 年之前
父節點
當前提交
5aca6b1082
共有 1 個文件被更改,包括 2 次插入6 次删除
  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
 }