๐ Bug HuntTS TypeScript Medium+20 XP
Null Check Missing
This crashes when user is null.
๐ Find the bug
1
function getNameLength(user: { name: string } | null) {2
return user.name.length;3
}๐ The bug is on line 2