From 4c8f27c0dcae84349aec985fb7dfb5d637ab13ed Mon Sep 17 00:00:00 2001 From: David Worms Date: Wed, 26 Jun 2024 00:13:34 +0200 Subject: [PATCH] refactor(mdx): aesthetic usage of promise --- packages/redac/lib/plugin-mdx/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/redac/lib/plugin-mdx/index.js b/packages/redac/lib/plugin-mdx/index.js index 15d83a2..a14661f 100644 --- a/packages/redac/lib/plugin-mdx/index.js +++ b/packages/redac/lib/plugin-mdx/index.js @@ -39,7 +39,8 @@ export default (config) => { }, 'engine:source': async ({ documents }) => each(configs, true, async (config) => { - const docs = await step_1_normalize({ config }) + const docs = await Promise.resolve({ config }) + .then(step_1_normalize) .then(step_2_load) .then(step_3_enrich) .then(step_4_parse)