From 0070972cbe3fafa62eb6de1f4e3e56c115a69368 Mon Sep 17 00:00:00 2001 From: Christopher Renaud Oelerich Date: Sun, 21 Apr 2024 12:26:48 -0500 Subject: [PATCH] Fix "Reset Connection to Discord" button deactivation. --- src/settings-form-application.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/settings-form-application.mjs b/src/settings-form-application.mjs index 13b637a..e527fa1 100644 --- a/src/settings-form-application.mjs +++ b/src/settings-form-application.mjs @@ -287,7 +287,6 @@ export class OronderSettingsFormApplication extends FormApplication { const event_listener = async event => { if (event.data.status_code) { clearInterval(message_interval) - this.init_active = false popup.close() event.data.errs.forEach(e => Logger.error(e, {permanent: true})) if (event.data.auth && event.data.guild) { @@ -302,6 +301,7 @@ export class OronderSettingsFormApplication extends FormApplication { )?.id ?? '' ) } + this.object.init_active = false this.object.buttons_disabled = false this.render() } @@ -314,8 +314,8 @@ export class OronderSettingsFormApplication extends FormApplication { if (popup.closed) { clearInterval(close_interval) window.removeEventListener('message', event_listener) - if (this.init_active) { //if init_waiting is false we have don't need to do anything - this.init_active = false + if (this.object.init_active) { //if init_waiting is false we have don't need to do anything + this.object.init_active = false this.object.buttons_disabled = false this.render() }