fix: user undefined (#9022)
parent
5cc530593b
commit
81e57afcf4
|
@ -35,9 +35,9 @@ export const useIntercom = () => {
|
|||
}
|
||||
|
||||
hookData.boot({
|
||||
name: data?.name ?? "",
|
||||
email: data?.email,
|
||||
userId: String(data?.id),
|
||||
...(data && data?.name && { name: data.name }),
|
||||
...(data && data?.email && { email: data.email }),
|
||||
...(data && data?.id && { userId: data.id }),
|
||||
createdAt: String(dayjs(data?.createdDate).unix()),
|
||||
...(userHash && { userHash }),
|
||||
customAttributes: {
|
||||
|
@ -50,6 +50,7 @@ export const useIntercom = () => {
|
|||
has_paid_plan: hasPaidPlan,
|
||||
has_team_plan: hasTeamPlan,
|
||||
metadata: data?.metadata,
|
||||
is_logged_in: !!data,
|
||||
},
|
||||
});
|
||||
hookData.show();
|
||||
|
|
Loading…
Reference in New Issue