From: Ben Walton Date: Fri, 16 May 2008 16:52:11 +0000 (-0400) Subject: fix exception when editting an empty MULTI_HEADER X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=692cd5119c0cd2d1455577c3e61eba27a3de89b2;p=sup 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. --- diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index 8bb7756..b2b60eb 100644 --- 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]