sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 692cd5119c0cd2d1455577c3e61eba27a3de89b2
parent 5281145c4ecb5295fcdc87b5043bd8c525ccd1aa
Author: Ben Walton <bwalton@artsci.utoronto.ca>
Date:   Fri, 16 May 2008 12:52:11 -0400

fix exception when editting an empty MULTI_HEADER

In edit-message-mode, an exception is generated by pressing 'c' to edit the Cc
field when no value currently exists.  This is due to calling Array.join() on
nil.  This patch addresses the execption by forcing an empty array when the
current value is nil.

Diffstat:
M lib/sup/modes/edit-message-mode.rb | 1 +
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
@@ -383,6 +383,7 @@ protected
       default =
         case field
         when *MULTI_HEADERS
+	  @header[field] ||= []
           @header[field].join(", ")
         else
           @header[field]