From 72168b15865e96cecb301669b457a4538122ca33 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 14 Aug 2025 02:42:28 +0400 Subject: [PATCH] fix: community function import --- src/lib/components/admin/Functions.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/components/admin/Functions.svelte b/src/lib/components/admin/Functions.svelte index 4b60d956c3..757dd80056 100644 --- a/src/lib/components/admin/Functions.svelte +++ b/src/lib/components/admin/Functions.svelte @@ -626,7 +626,12 @@ const _functions = JSON.parse(event.target.result); console.log(_functions); - for (const func of _functions) { + for (let func of _functions) { + if ('function' in func) { + // Required for Community JSON import + func = func.function; + } + const res = await createNewFunction(localStorage.token, func).catch((error) => { toast.error(`${error}`); return null;