Skip to content

Commit

Permalink
nil エラー回避
Browse files Browse the repository at this point in the history
  • Loading branch information
komstat committed May 7, 2024
1 parent 0b0aac3 commit 47299c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exe/mb-public
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ case gets.chomp
if field_name == "Person Email"
# do nothing
elsif idf_corrected_h[field_name]
idf_public_f.puts "#{field_name}\t#{idf_corrected_h[field_name].collect{|e| e.match(/\n|\t/) ? '"' + e + '"' : e }.join("\t")}"
idf_public_f.puts "#{field_name}\t#{idf_corrected_h[field_name].collect{|e| e && e.match(/\n|\t/) ? '"' + e + '"' : e }.join("\t")}"
else
idf_public_f.puts "#{line_a.collect{|e| e.match(/\n|\t/) ? '"' + e + '"' : e }.join("\t")}"
idf_public_f.puts "#{line_a.collect{|e| e && e.match(/\n|\t/) ? '"' + e + '"' : e }.join("\t")}"
end

end
Expand Down

0 comments on commit 47299c2

Please sign in to comment.