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.`) } } }