aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--widgets/compose.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 18fe38c..31c0a2d 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -221,7 +221,7 @@ func (c *Composer) PrepareHeader() (*mail.Header, []string, error) {
if subject, _ := header.Subject(); subject == "" {
header.SetSubject(c.headers.subject.input.String())
}
- if date, err := header.Date(); err != nil && date != (time.Time{}) {
+ if date, err := header.Date(); err != nil || date == (time.Time{}) {
header.SetDate(time.Now())
}
if from, _ := mhdr.Text("From"); from == "" {