From 4b6ad16f99b5827732470e0f376f677a0fed338f Mon Sep 17 00:00:00 2001 From: Elior Boukhobza Date: Tue, 5 Sep 2017 17:53:08 +0300 Subject: [PATCH] Update header.rb (#21) Fix nil exception when no comments in the file --- lib/poparser/header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/poparser/header.rb b/lib/poparser/header.rb index 71ad482..fd85339 100644 --- a/lib/poparser/header.rb +++ b/lib/poparser/header.rb @@ -7,7 +7,7 @@ class Header def initialize(entry) @entry = entry - @comments = entry.translator_comment.value + @comments = entry.translator_comment.value unless entry.translator_comment.nil? @original_configs = convert_msgstr_to_hash(entry.msgstr) @flag = entry.flag