Explorar o código

Merge all tl files when parsing

YouTwitFace %!s(int64=5) %!d(string=hai) anos
pai
achega
67e6963fbc
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      index.js

+ 4 - 3
index.js

@@ -47,9 +47,10 @@ const generate = (which, action = 'gen') => {
         ),
     ];
 
-    const [tlobjects] = TLOBJECT_IN_TLS.map(file => [
-        ...parseTl(file, layer, methods),
-    ]);
+    const tlobjects = TLOBJECT_IN_TLS.reduce(
+        (files, file) => [...files, ...parseTl(file, layer, methods)],
+        []
+    );
 
     if (!which || which.length === 0) {
         which.push('tl', 'errors');