Fix WI reloading on slash commands
| @@ -893,7 +893,7 @@ function registerWorldInfoSlashCommands() { | ||
| 893 | 893 | * @param {boolean} [loadIfNotSelected=false] - Indicates whether to load the file even if it's not currently selected |
| 894 | 894 | */ |
| 895 | 895 | function reloadEditor(file, loadIfNotSelected = false) { |
| 896 | 896 | const currentIndex = Number($('#world_editor_select').val()); |
| 897 | 897 | const selectedIndex = world_names.indexOf(file); |
| 898 | 898 | if (selectedIndex !== -1 && (loadIfNotSelected || currentIndex === selectedIndex)) { |
| 899 | 899 | $('#world_editor_select').val(selectedIndex).trigger('change'); |