From a5309c7e5e1ec12855d6d519f1a9aa5951036804 Mon Sep 17 00:00:00 2001 From: seveibar Date: Mon, 11 Nov 2024 12:24:25 -0800 Subject: [PATCH] fix component type name --- lib/su.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/su.ts b/lib/su.ts index 9655d1c..ff3c112 100644 --- a/lib/su.ts +++ b/lib/su.ts @@ -154,7 +154,9 @@ export const su: GetSoupUtilFn = (( }, update: (id: string, newProps: any) => { const elm = soup.find( - (e) => (e as any)[`${component_type}_id`] === id, + (e) => + e.type === component_type && + (e as any)[`${component_type}_id`] === id, ) if (!elm) return Object.assign(elm, newProps)