Explorar o código

remove guard helper

Brian Gough %!s(int64=5) %!d(string=hai) anos
pai
achega
c044db4897
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      services/clsi/app/js/OutputFileFinder.js

+ 2 - 1
services/clsi/app/js/OutputFileFinder.js

@@ -36,9 +36,10 @@ module.exports = OutputFileFinder = {
       const outputFiles = []
       for (const file of Array.from(allFiles)) {
         if (!incomingResources.has(file)) {
+          const type = Path.extname(file)
           outputFiles.push({
             path: file,
-            type: __guard__(file.match(/\.([^\.]+)$/), (x) => x[1]),
+            type: Path.extname(file) || undefined,
           })
         }
       }