From 73530afebd531ab03426591272fa53c37dcff02c Mon Sep 17 00:00:00 2001 From: Parrot Date: Tue, 17 Oct 2023 22:33:46 +0000 Subject: [PATCH] =?UTF-8?q?[=F0=9F=94=A8]=20Fixing=20ts-standard=20errors?= =?UTF-8?q?=20I=20made=20earlier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index a6201d0..24f0676 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,9 +19,12 @@ window.fs = new (window as any).Filer.FileSystem() const params = new URLSearchParams(window.location.search) -async function enableDebug() { - const { default: eruda } = await import("eruda") +async function enableDebug (): Promise { + const { default: eruda } = await import('eruda') eruda.init() + return await Promise.resolve() } -if (params.get("debug")) enableDebug() \ No newline at end of file +if (params.get('debug') !== null && params.get('debug') !== undefined) { + enableDebug().catch(e => console.error(e)) +}