mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
JavaScript string compare '' is always a ToBoolean
See https://www.ecma-international.org/ecma-262/5.1/#sec-9.2
This commit is contained in:
parent
82bed1ed80
commit
2ba34532c2
57 changed files with 213 additions and 218 deletions
|
|
@ -345,15 +345,15 @@ class ComposeOpenPgpPopupView extends AbstractViewNext {
|
|||
|
||||
this.resultCallback = fCallback;
|
||||
|
||||
if ('' !== sTo) {
|
||||
if (sTo) {
|
||||
rec.push(sTo);
|
||||
}
|
||||
|
||||
if ('' !== sCc) {
|
||||
if (sCc) {
|
||||
rec.push(sCc);
|
||||
}
|
||||
|
||||
if ('' !== sBcc) {
|
||||
if (sBcc) {
|
||||
rec.push(sBcc);
|
||||
}
|
||||
|
||||
|
|
@ -361,7 +361,7 @@ class ComposeOpenPgpPopupView extends AbstractViewNext {
|
|||
rec = rec.map(value => {
|
||||
email.clear();
|
||||
email.parse(trim(value));
|
||||
return '' === email.email ? false : email.email;
|
||||
return email.email || false;
|
||||
}).filter(value => !!value);
|
||||
|
||||
if (identity && identity.email()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue