From e304c9217f80e24dc770c8b88972e1107c9038cb Mon Sep 17 00:00:00 2001 From: kennethloeffler Date: Fri, 1 Nov 2024 15:51:45 +0000 Subject: [PATCH] It's a one-liner now, wow! --- rbx_dom_lua/src/EncodedValue.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rbx_dom_lua/src/EncodedValue.lua b/rbx_dom_lua/src/EncodedValue.lua index 060dc980..67d78e45 100644 --- a/rbx_dom_lua/src/EncodedValue.lua +++ b/rbx_dom_lua/src/EncodedValue.lua @@ -207,12 +207,7 @@ types = { EnumItem = { fromPod = function(pod) - local enum = Enum[pod.type] - - -- If the given EnumItem value is not valid for this Enum, then - -- that's pretty weird, but we'll just return the first one in the - -- list instead - return enum:FromValue(pod.value) or enum:GetEnumItems()[1] + return Enum[pod.type]:FromValue(pod.value) end, toPod = function(roblox)