From 929e66147805da9fb3a29283b05812ceb68d1d1b Mon Sep 17 00:00:00 2001 From: Christian Doczkal <20443222+chdoc@users.noreply.github.com> Date: Thu, 21 Aug 2025 18:51:26 +0200 Subject: [PATCH] fix index of nil value --- husbandry.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/husbandry.lua b/husbandry.lua index a5a8bff91..cf8085746 100644 --- a/husbandry.lua +++ b/husbandry.lua @@ -116,7 +116,7 @@ local function getAppropriateWorkshop(unit, collection) end end end - return #closest.jobs < 10 and closest or nil + return (closest and #closest.jobs < 10) and closest or nil end local function shearCreature(unit, workshop)