mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Fix removing world link from character
This commit is contained in:
		| @@ -4824,8 +4824,9 @@ export function select_selected_character(chid) { | |||||||
|     $("#renameCharButton").css("display", ""); |     $("#renameCharButton").css("display", ""); | ||||||
|     $('.open_alternate_greetings').data('chid', chid); |     $('.open_alternate_greetings').data('chid', chid); | ||||||
|     $('#set_character_world').data('chid', chid); |     $('#set_character_world').data('chid', chid); | ||||||
|     const world = !!(characters[chid].data?.extensions?.world); |     const world = characters[chid]?.data?.extensions?.world; | ||||||
|     $('#set_character_world').toggleClass('world_set', world && world_names.includes(world)); |     const worldSet = world && world_names.includes(world); | ||||||
|  |     $('#set_character_world').toggleClass('world_set', worldSet); | ||||||
|  |  | ||||||
|     $("#form_create").attr("actiontype", "editcharacter"); |     $("#form_create").attr("actiontype", "editcharacter"); | ||||||
|     saveSettingsDebounced(); |     saveSettingsDebounced(); | ||||||
| @@ -5263,7 +5264,7 @@ function openCharacterWorldPopup() { | |||||||
|  |  | ||||||
|     function onSelectCharacterWorld() { |     function onSelectCharacterWorld() { | ||||||
|         const value = $(this).find('option:selected').val(); |         const value = $(this).find('option:selected').val(); | ||||||
|         const worldIndex = Number(value); |         const worldIndex = value !== '' ? Number(value) : NaN; | ||||||
|         const name = !isNaN(worldIndex) ? world_names[worldIndex] : ''; |         const name = !isNaN(worldIndex) ? world_names[worldIndex] : ''; | ||||||
|  |  | ||||||
|         $('#character_world').val(name); |         $('#character_world').val(name); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user