From 3dcdaa9560c53c4516f13c951ccb95bd73e07cd8 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 6 Oct 2018 21:04:51 +0200 Subject: [PATCH] Fixed writing of files --- prepare.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prepare.js b/prepare.js index 6c9c084..9c0f4ef 100644 --- a/prepare.js +++ b/prepare.js @@ -7,8 +7,8 @@ module.exports = (app) => { function renderAndSave(file, template, options) { file = path.join(staticDir, file); app.render(template, options, (e, r) => { - if (e) return fs.writeFile(file, "Something went wrong!

Something went wrong!

Could not render this page! Please contact the administrator!

"); - return fs.writeFile(file, r); + if (e) return fs.writeFile(file, "Something went wrong!

Something went wrong!

Could not render this page! Please contact the administrator!

", () => undefined); + return fs.writeFile(file, r, () => undefined); }); }