Skip to content

Commit

Permalink
A fix to stop EMCO from throwing an error when it is initialized with…
Browse files Browse the repository at this point in the history
…out consoles
  • Loading branch information
Bornasm authored and Borna committed Sep 21, 2023
1 parent a30c285 commit 34a05c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/resources/emco.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,12 @@ end
--- resets the object, redrawing everything
function EMCO:reset()
self:createContainers()

if next(self.consoles) == nil then
-- Stop execution if there are no consoles, this happens if EMCO is initialized by passing an empty table into consoles property
return
end

for _, tabName in ipairs(self.consoles) do
self:createComponentsForTab(tabName)
end
Expand Down

0 comments on commit 34a05c1

Please sign in to comment.