From d46fd9d17420b2beeb1681a9ba936b281a93b81e Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Sun, 28 Jul 2024 04:17:45 +0200 Subject: [PATCH] Fix WI reloading on slash commands --- public/scripts/world-info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 70cbc069a..1de1cd419 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -893,7 +893,7 @@ function registerWorldInfoSlashCommands() { * @param {boolean} [loadIfNotSelected=false] - Indicates whether to load the file even if it's not currently selected */ function reloadEditor(file, loadIfNotSelected = false) { - const currentIndex = $('#world_editor_select').val(); + const currentIndex = Number($('#world_editor_select').val()); const selectedIndex = world_names.indexOf(file); if (selectedIndex !== -1 && (loadIfNotSelected || currentIndex === selectedIndex)) { $('#world_editor_select').val(selectedIndex).trigger('change');