From 6c22f57bccbdcf32932f2f18c62130e8f630cbcf Mon Sep 17 00:00:00 2001 From: "(Jip) Willem Wijnia" Date: Sat, 24 Feb 2024 09:33:56 +0100 Subject: [PATCH] Fix bug with returning nil --- lua/sim/Unit.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/sim/Unit.lua b/lua/sim/Unit.lua index b470338c3d..69b04a6ec9 100644 --- a/lua/sim/Unit.lua +++ b/lua/sim/Unit.lua @@ -1085,9 +1085,9 @@ Unit = ClassUnit(moho.unit_methods, IntelComponent, VeterancyComponent) { local buildrate = cUnitGetBuildRate(self) if buildrate < 0 then buildrate = 0.00001 - else - return buildrate end + + return buildrate end, ---@param self Unit