Skip to content

Commit

Permalink
It's a one-liner now, wow!
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethloeffler committed Nov 1, 2024
1 parent ac2567b commit e304c92
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions rbx_dom_lua/src/EncodedValue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e304c92

Please sign in to comment.