From c63eff921e8169c820f867d50e4328f48e9a50f2 Mon Sep 17 00:00:00 2001 From: Robert McIntosh Date: Mon, 26 Sep 2022 21:42:22 -0400 Subject: [PATCH] Missing important Semicolon (#34) * onchange patch Removed attaching an onchange event to core setting. Instead places it in `then` promise. * Update CHANGELOG.md * Update module.json * v1.4.5 switched to await. Fixed function logic. Added Comment to end of Line in hopes to make it easy to find to remove. * Update CHANGELOG.md * Important semicolon Added a super important semicolon that was missing --- CHANGELOG.md | 3 +++ js/find-the-culprit.js | 4 ++-- module.json | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57989ed..a4e9f96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# v1.4.6 +- Added semicolon to end of `await game.settings.set(...)` was causing reload logic to error + # v1.4.5 - Moved window reload logic to `await` instead of core settings `onchange` event. Fixes incompatibility between MM+ and Ftc diff --git a/js/find-the-culprit.js b/js/find-the-culprit.js index 561e42b..d3aca06 100644 --- a/js/find-the-culprit.js +++ b/js/find-the-culprit.js @@ -346,7 +346,7 @@ async function deactivationStep(chosenModules = []) { await game.settings.set(moduleName, "modules", currSettings); } - await game.settings.set("core", ModuleManagement.CONFIG_SETTING, original) + await game.settings.set("core", ModuleManagement.CONFIG_SETTING, original); (foundry.utils.debouncedReload ?? window.location.reload)(); // Temporarily required by foundryvtt/foundryvtt#7740 } @@ -357,7 +357,7 @@ async function reactivateModules() { ); for (let mod in curr.original) original[mod] = curr.original[mod]; - await game.settings.set("core", ModuleManagement.CONFIG_SETTING, original) + await game.settings.set("core", ModuleManagement.CONFIG_SETTING, original); (foundry.utils.debouncedReload ?? window.location.reload)(); // Temporarily required by foundryvtt/foundryvtt#7740 } diff --git a/module.json b/module.json index ee9045f..3f83c77 100644 --- a/module.json +++ b/module.json @@ -15,7 +15,7 @@ "bugs": "https://github.com/Moerill/fvtt-find-the-culprit/issues", "changelog": "https://github.com/Moerill/fvtt-find-the-culprit/blob/master/CHANGELOG.md", "flags": {}, - "version": "1.4.5", + "version": "1.4.6", "compatibility": { "minimum": "9", "verified": "10" @@ -32,6 +32,6 @@ "dependencies": [], "socket": false, "manifest": "https://raw.githubusercontent.com/Moerill/fvtt-find-the-culprit/master/module.json", - "download": "https://github.com/Moerill/fvtt-find-the-culprit/releases/download/v1.4.5/v1.4.5.zip", + "download": "https://github.com/Moerill/fvtt-find-the-culprit/releases/download/v1.4.6/v1.4.6.zip", "protected": false }