This commit is contained in:
the-djmaze 2023-02-12 01:02:55 +01:00
parent 98d686bc14
commit 6237a3691b
3 changed files with 5 additions and 5 deletions

View file

@ -302,7 +302,7 @@ export class EmailModel extends AbstractModel {
* @returns {string}
*/
hash(withoutName = false) {
return '#' + (withoutName ? '' : this.name) + '#' + this.email + '#';
return '#' + (withoutName ? '' : this.name) + '#' + (this.email || this.name) + '#';
}
/**
@ -328,8 +328,8 @@ export class EmailModel extends AbstractModel {
* @returns {string}
*/
toLine(friendlyView, wrapWithLink) {
let result = this.email,
name = this.name,
let name = this.name,
result = this.email || name,
toLink = text =>
'<a href="mailto:'
+ encodeHtml(result) + (name ? '?to=' + encodeURIComponent('"' + name + '" <' + result + '>') : '')