From e2e300d8a4290b1ea623fee35eca250e2b458338 Mon Sep 17 00:00:00 2001 From: "dr.dimitru" Date: Sat, 22 Oct 2022 13:33:07 +0300 Subject: [PATCH] Minor codebase enhancements --- meteor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meteor.js b/meteor.js index 3003942..2a386ab 100644 --- a/meteor.js +++ b/meteor.js @@ -111,7 +111,8 @@ module.exports = { try { const modernDirs = ['/bundle/programs/web.browser', '/bundle/programs/web.browser/app']; const legacyDirs = ['/bundle/programs/web.browser.legacy', '/bundle/programs/web.browser.legacy/app']; - const dataPaths = fs.lstatSync(path.join(buildPath, legacyDirs[0])).isDirectory() ? legacyDirs : modernDirs; + const isModern = fs.lstatSync(path.join(buildPath, legacyDirs[0])).isDirectory() ? false : true; + const dataPaths = isModern ? modernDirs : legacyDirs; dataPaths.forEach((givenPath) => { const clientPath = path.join(buildPath, givenPath); @@ -189,7 +190,7 @@ module.exports = { if (item.type === 'js' && item.url) { const file = item.path.replace(RE.path.app, ''); if (!files.js.includes(file)) { - files.js.push(file + '?hash=' + item.hash); + files.js.push(`${file}?hash=${item.hash}`); } } else if (item.type === 'css' && item.url) { const file = item.path.replace(RE.path.app, '');