fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
export function participationIdentity(): {name:string;email:string} {
|
||||
try { const value = JSON.parse(sessionStorage.getItem('investemoz-participation-identity') ?? 'null');
|
||||
return {name: typeof value?.name === 'string' ? value.name : '', email: typeof value?.email === 'string' ? value.email : ''};
|
||||
} catch { return {name:'',email:''}; }
|
||||
export function participationIdentity(): { name: string; email: string } {
|
||||
try {
|
||||
const value = JSON.parse(
|
||||
sessionStorage.getItem('investemoz-participation-identity') ??
|
||||
'null',
|
||||
);
|
||||
return {
|
||||
name: typeof value?.name === 'string' ? value.name : '',
|
||||
email: typeof value?.email === 'string' ? value.email : '',
|
||||
};
|
||||
} catch {
|
||||
return { name: '', email: '' };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user