fix: wrap button click handling in try-catch for improved error handling

This commit is contained in:
Eric Hilse
2025-11-26 08:46:20 -07:00
parent c80726eaf6
commit 922ddd080b
@@ -31,10 +31,14 @@ export function InviteUserButton() {
}
const handleClick = () => {
if (shouldShowUpgrade) {
performUpgradeClick('top_bar_right', 'upgrade-user-top-bar');
} else {
performInviteUserClick('top_bar_right', 'invite-user-top-bar');
try {
if (shouldShowUpgrade) {
performUpgradeClick('top_bar_right', 'upgrade-user-top-bar');
} else {
performInviteUserClick('top_bar_right', 'invite-user-top-bar');
}
} catch (error) {
console.error('Failed to handle button click:', error);
}
};