diff --git a/src/meta/js.js b/src/meta/js.js index 17c301726b..76f87f75e2 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -204,10 +204,11 @@ async function getModuleList() { }; }); - moduleFiles.concat(mods).forEach(function (mod) { - mod.filename = path.relative(basePath, mod.srcPath).replace(/\\/g, '/'); - }); + moduleFiles.push(...mods); })); + moduleFiles.forEach(function (mod) { + mod.filename = path.relative(basePath, mod.srcPath).replace(/\\/g, '/'); + }); return moduleFiles; }