fix: Deeply nested command menu actions have incorrect parent

This commit is contained in:
Tom Moor
2023-12-09 13:26:27 -05:00
parent 8a6b8404e4
commit 84ef72d846

View File

@@ -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 }))
);
}