diff --git a/src/greet.ts b/src/greet.ts index 08c455b..9a99423 100755 --- a/src/greet.ts +++ b/src/greet.ts @@ -1,3 +1,6 @@ export function greet(name: string): string { + if (!name || name.trim().length === 0) { + return "Hi there!"; + } return `Hi, ${name}!`; }