Skip to content

Commit

Permalink
Mitigate error in hoverInspect when entity no longer exists (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nidoxs authored Aug 13, 2024
1 parent 3f9dfce commit 1707f1c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/debugger/ui.luau
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ local function ui(debugger, loop)

local objectStack = plasma.useState({})
local worldViewOpen, setWorldViewOpen = plasma.useState(false)
local worldExists = debugger.debugWorld ~= nil

if debugger.hoverEntity then
custom.hoverInspect(debugger.debugWorld, debugger.hoverEntity, custom)
if debugger.hoverEntity and worldExists then
if debugger.debugWorld:contains(debugger.hoverEntity) then
custom.hoverInspect(debugger.debugWorld, debugger.hoverEntity, custom)
end
end

custom.container(function()
Expand Down

0 comments on commit 1707f1c

Please sign in to comment.