Skip to content

Commit

Permalink
fix: remove extra throw
Browse files Browse the repository at this point in the history
  • Loading branch information
Dup4 committed Jun 1, 2022
1 parent 84b2a76 commit 674388d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ const { green, yellow } = chalk;
export default function (filename: string): void {
const startTime = +new Date();

try {
const content = fs.readFileSync(filename, "utf8");
const result = RenderMathJax(content);
fs.writeFileSync(filename, result, "utf8");
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e: any) {
throw new Error(e.message);
}
const content = fs.readFileSync(filename, "utf8");
const result = RenderMathJax(content);
fs.writeFileSync(filename, result, "utf8");

const endTime = +new Date();

Expand Down
2 changes: 1 addition & 1 deletion packages/mathjax-render-for-mkdocs-material/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cli.command("").action(async (options: Options) => {
process.exit(1);
}

Render(options);
await Render(options);
});

cli.help();
Expand Down

0 comments on commit 674388d

Please sign in to comment.