From 4c8c164fe16fc9aac5c94dd721f30f54ea3ff305 Mon Sep 17 00:00:00 2001 From: halafy-ds <66537087+halafy-ds@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:08:44 +0200 Subject: [PATCH] Update generator.js --- src/generator.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/generator.js b/src/generator.js index 962d369..00560c2 100644 --- a/src/generator.js +++ b/src/generator.js @@ -72,14 +72,10 @@ const rehypeCitationGenerator = (Cite) => { } } else { if (isNode) { - bibtexFile.push(await readFile(bibliography[i])) - } else { - if (isNode) { - try { - bibtexFile.push(await readFile(bibliography[i])) - } catch (error) { - throw new Error(`Cannot read non valid bibliography URL in node env.`) - } + try { + bibtexFile.push(await readFile(bibliography[i])) + } catch (error) { + throw new Error(`Cannot read non valid bibliography URL in node env.`) } } }