From 2d809c955bb12afe690b1809ecded5490251760e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oliver=20R=C3=BCmpelein?= <oli_r@fg4f.de>
Date: Wed, 13 Jan 2021 17:11:07 +0100
Subject: [PATCH] Make cancellable withour exception

---
 src/module/rolls/check-factory.ts | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/module/rolls/check-factory.ts b/src/module/rolls/check-factory.ts
index 8d560ea0..4be81ee7 100644
--- a/src/module/rolls/check-factory.ts
+++ b/src/module/rolls/check-factory.ts
@@ -27,6 +27,7 @@ class CheckFactory {
     ) {
         this.checkOptions = new DefaultCheckOptions().mergeWith(passedOptions);
     }
+
     private checkOptions: DS4CheckFactoryOptions;
 
     async execute(): Promise<void> {
@@ -126,7 +127,9 @@ async function askGmModifier(
         new Dialog(
             {
                 title: title ?? "Roll Options",
-                close: (html: JQuery) => resolve(null),
+                close: () => {
+                    // Don't do anything
+                },
                 content: renderedHtml,
                 buttons: {
                     ok: {
@@ -142,7 +145,9 @@ async function askGmModifier(
                     },
                     cancel: {
                         label: "Cancel",
-                        callback: (html: JQuery) => resolve(null),
+                        callback: () => {
+                            // Don't do anything
+                        },
                     },
                 },
                 default: "ok",