From 244809bab78b1f20c8dab8c01104d9bcc658ba4e Mon Sep 17 00:00:00 2001 From: silentoplayz Date: Mon, 3 Nov 2025 21:03:27 -0500 Subject: [PATCH] fix: update Functions page after deleting a function The Functions page was not updating after a function was deleted. This was because the local `functions` variable was not being updated after a successful deletion. This commit fixes the bug by filtering the deleted function from the local `functions` array, which triggers a UI refresh. --- src/lib/components/admin/Functions.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/components/admin/Functions.svelte b/src/lib/components/admin/Functions.svelte index 4bbcebd15f..bd438257cb 100644 --- a/src/lib/components/admin/Functions.svelte +++ b/src/lib/components/admin/Functions.svelte @@ -158,6 +158,7 @@ if (res) { toast.success($i18n.t('Function deleted successfully')); + functions = functions.filter((f) => f.id !== func.id); _functions.set(await getFunctions(localStorage.token)); models.set(