diff options
author | David Gay <david@davidgay.org> | 2021-06-16 21:16:17 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-16 21:16:17 -0400 |
commit | 72aee968a1702826365e52e8dac43e95f020d0e9 (patch) | |
tree | da85fd0eec263fd634df852d93dd8f17dc690514 /app | |
parent | 163c947e3e353f8accda9ba017c3130b2004e86d (diff) |
Missed an extra necessary safe navigation operator
Diffstat (limited to 'app')
-rw-r--r-- | app/models/character.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/character.rb b/app/models/character.rb index 6cf1dbb..2f4ad62 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -122,7 +122,7 @@ class Character < ApplicationRecord broken_items = [] # TODO: HACK: Should check other stats besides speed stat in the future. # TODO: HACK: May not want a chance to break if speed is _reduced_. Though no equipment does this yet. - equipment.all.select { |eq| eq.effects&.select { |ef| ef[:gid] == "#{skill.gid}_speed" }.any? }.each do |equipment| + equipment.all.select { |eq| eq.effects&.select { |ef| ef[:gid] == "#{skill.gid}_speed" }&.any? }.each do |equipment| if equipment.break_check broken_items.push(equipment.item) end |