From 84ef72d846fbfb4b04bb927e9f4526d7b05c28e6 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 9 Dec 2023 13:26:27 -0500 Subject: [PATCH] fix: Deeply nested command menu actions have incorrect parent --- app/actions/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/actions/index.ts b/app/actions/index.ts index dcc4f36e3..4083bcc10 100644 --- a/app/actions/index.ts +++ b/app/actions/index.ts @@ -116,6 +116,8 @@ export function actionToKBar( icon: resolvedIcon, perform: action.perform ? () => action.perform?.(context) : undefined, }, + ].concat( // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. - ].concat(children.map((child) => ({ ...child, parent: action.id }))); + children.map((child) => ({ ...child, parent: child.parent ?? action.id })) + ); }