summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--app/lib/activity_processor.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 16a9213..38b0462 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.
### Fixed
- Results and chat areas sometimes didn't scroll to bottom when they should. This was caused by large result outputs
being larger than the scroll tolerance.
+- Activities without any requirements (such as opening an unlocked rusted lockbox or building a level 1 hearth
+ amenity) would fail.
## [0.1.11.3] - 2021-06-22
diff --git a/app/lib/activity_processor.rb b/app/lib/activity_processor.rb
index 6509b44..d995e06 100644
--- a/app/lib/activity_processor.rb
+++ b/app/lib/activity_processor.rb
@@ -121,7 +121,7 @@ class ActivityProcessor
# But just something to keep in mind.
# Note: This will result in equipment being checked twice if it provides two speed stats.
# Fine for now since no equipment gives two skill speed stats, but may want to refine in the future.
- if @activity.whatnot[:requirements].any?
+ if @activity.whatnot[:requirements]&.any?
required_skill_gids = @activity.whatnot[:requirements].select { |r| r[:type] == "skill" }.map { |r| r[:gid] }.uniq
required_skill_gids.each do |required_skill_gid|
skill = Skill.find_by_gid(required_skill_gid)