From 4cb1dbb41316a3e5171d2cccc8e8ee7c439c163b Mon Sep 17 00:00:00 2001 From: Krzysztof Morcinek Date: Sun, 16 Jan 2022 19:38:52 +0100 Subject: [PATCH] refactor: wrap globally in try/catch --- src/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1362896..91817c7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -243,7 +243,11 @@ export class ConquerorSpy { } } -ConquerorSpy.initialize(); -ConquerorSpy.start(); +try { + ConquerorSpy.initialize(); + ConquerorSpy.start(); +} catch (error) { + console.error(error); +} (window as any).conquerorSpy = ConquerorSpy;