From 3c89ac84211d18142d1421c5c3e23af719d0cc28 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Mon, 31 Mar 2025 09:01:17 -0700 Subject: [PATCH] Update src/components/CommandBar/CommandBarSelectionInput.tsx Co-authored-by: Jonathan Tran --- src/components/CommandBar/CommandBarSelectionInput.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/CommandBar/CommandBarSelectionInput.tsx b/src/components/CommandBar/CommandBarSelectionInput.tsx index 2dbecf891..03b931e72 100644 --- a/src/components/CommandBar/CommandBarSelectionInput.tsx +++ b/src/components/CommandBar/CommandBarSelectionInput.tsx @@ -128,9 +128,10 @@ function CommandBarSelectionInput({ // Set selection filter if needed, and reset it when the component unmounts useEffect(() => { arg.selectionFilter && kclManager.setSelectionFilter(arg.selectionFilter) - toSync(() => { - return kclManager.defaultSelectionFilter(selection) - }, reportRejection)() + // TODO: We shouldn't use async here. + return toSync(async () => { + await kclManager.defaultSelectionFilter(selection) + }, reportRejection) }, [arg.selectionFilter]) return (