Skip to content

Commit

Permalink
Check if currentRootActionId action exists (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
rihardsgravis authored Apr 21, 2022
1 parent 4ab070d commit 6acbc2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/KBarSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function KBarSearch(
const placeholder = React.useMemo(
(): string => {
const defaultText = props.defaultPlaceholder ?? "Type a command or search…";
return currentRootActionId
return currentRootActionId && actions[currentRootActionId]
? actions[currentRootActionId].name
: defaultText;
}, [actions, currentRootActionId, props.defaultPlaceholder]);
Expand Down

1 comment on commit 6acbc2a

@vercel
Copy link

@vercel vercel bot commented on 6acbc2a Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kbar – ./

kbar.vercel.app
kbar-git-main-timc.vercel.app
kbar-timc.vercel.app

Please sign in to comment.