From 990ffd25209b8e6b4e9dd2a8c07d387cbaafbb53 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Tue, 24 Oct 2023 11:55:47 +0800 Subject: [PATCH] Apply code review suggestions from @RyanZim --- lib/output-file/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/output-file/index.js b/lib/output-file/index.js index c1babfa4..a42d9436 100644 --- a/lib/output-file/index.js +++ b/lib/output-file/index.js @@ -9,9 +9,7 @@ const pathExists = require('../path-exists').pathExists async function outputFile (file, data, encoding = 'utf-8') { const dir = path.dirname(file) - const itDoes = await pathExists(dir) - - if (!itDoes) { + if (!(await pathExists(dir))) { await mkdir.mkdirs(dir) }