From b36e5d0d3ba9fc774e830dd21c2f149277d198c1 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 24 Jan 2023 16:08:43 +0530 Subject: [PATCH] fix: Remove unnecessary void's. Co-authored-by: Alois Klink --- packages/mermaid/src/mermaid.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/mermaid/src/mermaid.ts b/packages/mermaid/src/mermaid.ts index b859a6a84..6af1a2b0f 100644 --- a/packages/mermaid/src/mermaid.ts +++ b/packages/mermaid/src/mermaid.ts @@ -339,7 +339,8 @@ const contentLoaded = function () { if (mermaid.startOnLoad) { const { startOnLoad } = mermaidAPI.getConfig(); if (startOnLoad) { - void mermaid.init(); + // eslint-disable-next-line no-console + mermaid.init().catch((err) => console.error('Mermaid failed to initialize', err)); } } }; @@ -418,7 +419,7 @@ const parseAsync = (txt: string): Promise => { ); }); executionQueue.push(performCall); - void executeQueue(); + executeQueue().catch(reject); }); }; @@ -451,7 +452,7 @@ const renderAsync = ( ); }); executionQueue.push(performCall); - void executeQueue(); + executeQueue().catch(reject); }); };