We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7919ba1 commit d18a9c0Copy full SHA for d18a9c0
src/components/merge/MailMerge.tsx
@@ -45,11 +45,14 @@ const MailMerge = ({ configPath }: MailMergeProps) => {
45
setRowsCount(rowCount);
46
setPdfConfig(pdfConf);
47
48
- const smtpConf: SmtpConfigType = await ipcRenderer.invoke('get-store', {
49
- key: SmtpConfigKey,
50
- });
51
- setFromEmail(smtpConf.user);
52
- setSmtpValid(smtpConf.valid);
+ const smtpConf: SmtpConfigType | undefined = await ipcRenderer.invoke(
+ 'get-store',
+ {
+ key: SmtpConfigKey,
+ }
53
+ );
54
+ setFromEmail(smtpConf ? smtpConf.user : '');
55
+ setSmtpValid(smtpConf ? smtpConf.valid : false);
56
};
57
58
const handleChangeSubject = (e: any) => {
0 commit comments