Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helpers/shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const tooltips: Record<string, string> = {
};

function getTooltip(key: string) {
return tooltips[key];
return ":" + tooltips[key];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🐛 Bug
The getTooltip function does not check if the key exists in the tooltips object before accessing it. This could lead to returning ':undefined' if the key is not found, potentially causing unexpected behavior when the tooltip is used.

Suggested change
return ":" + tooltips[key];
return tooltips[key] ? ':' + tooltips[key] : undefined;

}
function transformKeys(keys: string[]) {
return keys.map((key: string) => {
Expand Down