Jelajahi Sumber

Rescue error from Mail::Address#name and #address

`Mail::Address.new('')` does not raise any error but calling `name` on
the created instance does.
Akinori MUSHA 8 tahun lalu
induk
melakukan
852f39d480
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      lib/feedjira_extension.rb

+ 2 - 2
lib/feedjira_extension.rb

@@ -45,8 +45,8 @@ module FeedjiraExtension
       rescue
         self.name = content
       else
-        self.name = addr.name
-        self.email = addr.address
+        self.name = addr.name rescue nil
+        self.email = addr.address rescue nil
       end
     end