Skip to content

Commit

Permalink
fix: 🐛 DM の取得タイミングにより AnalyzeSyntax が生成できていない場合に対応 (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikukyugamer committed Jun 12, 2021
1 parent 680a6d4 commit 7738462
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/lib/suikoden_database/pickup_character_names.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ module SuikodenDatabase
class PickupCharacterNames
class << self
def execute(tweet_or_dm)
check_words = tweet_or_dm.analyze_syntax.check_words
# FIXME: tweet_or_dm.analyze_syntax が nil の場合がある
# おそらく DM は別タイミングで取得しているから、DM の analyze_syntax が存在しないときだろう
check_words = tweet_or_dm.analyze_syntax&.check_words

gensosenkyo_candidate_names = []
check_words.each do |check_word|
Expand Down

0 comments on commit 7738462

Please sign in to comment.