From 993e3b7e1ca782ff50673e8411954d80f620c72e Mon Sep 17 00:00:00 2001 From: Jack T <44332148+jackTabsCode@users.noreply.github.com> Date: Thu, 30 Nov 2023 03:57:18 -0800 Subject: [PATCH 1/2] check if the world contains an entity before displaying the tooltip --- lib/debugger/widgets/hoverInspect.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/debugger/widgets/hoverInspect.lua b/lib/debugger/widgets/hoverInspect.lua index 6eaeaf8..5144e22 100644 --- a/lib/debugger/widgets/hoverInspect.lua +++ b/lib/debugger/widgets/hoverInspect.lua @@ -4,6 +4,8 @@ local FormatMode = formatTableModule.FormatMode return function(plasma) return plasma.widget(function(world, id, custom) + if not world:contains(id) then return end + local entityData = world:_getEntity(id) local str = "Entity " .. id .. "\n\n" From 3386ae2a7c1effbaa0f902b916f11f983874f929 Mon Sep 17 00:00:00 2001 From: Jack Taylor Date: Tue, 19 Dec 2023 16:42:19 -0800 Subject: [PATCH 2/2] stylua format --- lib/debugger/widgets/hoverInspect.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/debugger/widgets/hoverInspect.lua b/lib/debugger/widgets/hoverInspect.lua index 5144e22..894af2b 100644 --- a/lib/debugger/widgets/hoverInspect.lua +++ b/lib/debugger/widgets/hoverInspect.lua @@ -4,8 +4,10 @@ local FormatMode = formatTableModule.FormatMode return function(plasma) return plasma.widget(function(world, id, custom) - if not world:contains(id) then return end - + if not world:contains(id) then + return + end + local entityData = world:_getEntity(id) local str = "Entity " .. id .. "\n\n"