From 865d6b4f5b5a0ed41b763601835b60a2795f147d Mon Sep 17 00:00:00 2001 From: Guillaume ARM Date: Mon, 20 May 2024 19:33:14 +0200 Subject: [PATCH] fix(inferium-harvester): removeFirst util --- inferium-harvester.lua | 6 ++++++ 1 file changed, 6 insertions(+) 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