refac
This commit is contained in:
@@ -179,8 +179,8 @@
|
|||||||
try {
|
try {
|
||||||
await deletePromptHistoryVersion(localStorage.token, prompt.id, historyId);
|
await deletePromptHistoryVersion(localStorage.token, prompt.id, historyId);
|
||||||
toast.success($i18n.t('Version deleted'));
|
toast.success($i18n.t('Version deleted'));
|
||||||
// Reload history
|
// Reload history from scratch
|
||||||
await loadHistory();
|
await loadHistory(true);
|
||||||
// Reset selection if deleted entry was selected
|
// Reset selection if deleted entry was selected
|
||||||
if (selectedHistoryEntry?.id === historyId) {
|
if (selectedHistoryEntry?.id === historyId) {
|
||||||
selectedHistoryEntry = history.length > 0 ? history[0] : null;
|
selectedHistoryEntry = history.length > 0 ? history[0] : null;
|
||||||
|
|||||||
Reference in New Issue
Block a user