Skip to content

Commit

Permalink
Update generator.js
Browse files Browse the repository at this point in the history
  • Loading branch information
halafy-ds authored Oct 18, 2024
1 parent d254cc4 commit 4c8c164
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`)
}
}
}
Expand Down

0 comments on commit 4c8c164

Please sign in to comment.