mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
make return value match mergeTooltipAndShortcut() signature
This commit is contained in:
parent
70c3b51b0b
commit
aba8df7708
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,10 @@ export function mergeTooltipAndShortcut(
|
|||
tooltip: string | undefined,
|
||||
shortcutLabel: string | undefined
|
||||
): string | undefined {
|
||||
if (!tooltip && !shortcutLabel) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let buf = tooltip ?? "";
|
||||
if (shortcutLabel) {
|
||||
buf = `${buf} (${shortcutLabel})`;
|
||||
|
|
Loading…
Reference in a new issue