diff --git a/inferium-harvester.lua b/inferium-harvester.lua index fe089f9..40deb60 100644 --- a/inferium-harvester.lua +++ b/inferium-harvester.lua @@ -62,6 +62,8 @@ local function removeFirst(t, x) table.insert(res, v) end end + + return res end local function find(t, predicate) @@ -404,6 +406,10 @@ local function replantProcedure() retrieveLocalPlan() end + if localPlan == nil then + error('cannot retrieve the local plan') + end + local remotePlan = fetchRemotePlan() if remotePlan == nil then