From e680b0f2c30e1530fe7d78745929701459627811 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Fri, 15 Nov 2019 18:47:53 +0100 Subject: [PATCH] Move file update call outside of forEach --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 9217118..27ebfe2 100644 --- a/index.js +++ b/index.js @@ -24,11 +24,11 @@ function replaceRootSyntaxWithAbsolutePath(bundle) { shouldUpdate = true } }) - - if (shouldUpdate) { - fs.writeFileSync(filePath, $.html()) - } }) + + if (shouldUpdate) { + fs.writeFileSync(filePath, $.html()) + } } }