File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ ${message.textPlain}`;
4545} ;
4646
4747const formatFromEmailWithName = ( emailHeader : string ) => {
48- const match = emailHeader . match ( / ( .* ?) \s * < ( [ ^ > ] + ) > / ) ;
49- if ( ! match ) return emailHeader ;
48+ const match = emailHeader ? .match ( / ( .* ?) \s * < ( [ ^ > ] + ) > / ) ;
49+ if ( ! match ) return emailHeader || "" ;
5050
5151 const [ , name , email ] = match ;
5252 const trimmedName = name . trim ( ) ;
@@ -55,8 +55,8 @@ const formatFromEmailWithName = (emailHeader: string) => {
5555} ;
5656
5757const formatToEmailWithName = ( emailHeader : string ) => {
58- const match = emailHeader . match ( / ( .* ?) \s * < ( [ ^ > ] + ) > / ) ;
59- if ( ! match ) return emailHeader ;
58+ const match = emailHeader ? .match ( / ( .* ?) \s * < ( [ ^ > ] + ) > / ) ;
59+ if ( ! match ) return emailHeader || "" ;
6060
6161 const [ , name , email ] = match ;
6262 const trimmedName = name . trim ( ) ;
Original file line number Diff line number Diff line change 1- v1.3.14
1+ v1.3.15
You can’t perform that action at this time.
0 commit comments