Fix old name prepopulate, run formatter

7061753d84ce2a7f428f3e92792f0a13f535423a

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -3Showing whitespace changes
public/scripts/preset-manager.js+4 -3
@@ -739,7 +739,8 @@ async function waitForConnection() {
739739export async function initPresetManager() {
740740 eventSource.on(event_types.CHAT_CHANGED, autoSelectPreset);
741741 registerPresetManagers();
742742 SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'preset',
743+ name: 'preset',
743744 callback: presetCommandCallback,
744745 returns: 'current preset',
745746 unnamedArgumentList: [
@@ -802,9 +803,9 @@ export async function initPresetManager() {
802803 }
803804
804805 const popupHeader = !presetManager.isAdvancedFormatting() ? t`Rename preset` : t`Rename template`;
805806 const oldName = namepresetManager.getSelectedPresetName();
806807 const newName = await Popup.show.input(popupHeader, t`Enter a new name:`, oldName);
807808 if (!newName || oldName === newName || !newName) {
808809 console.debug(!presetManager.isAdvancedFormatting() ? 'Preset rename cancelled' : 'Template rename cancelled');
809810 return;
810811 }