Skip to content

Commit

Permalink
Remove unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
memorycode committed Nov 18, 2024
1 parent b196b4f commit 8e8cf67
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/Component.luau
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,13 @@ local function new(name: string, defaultData)
-- If no default data is provided, we want to default a table.
data = if data == nil then defaultData or {} else data

local component = getmetatable(ComponentInstance :: any)
if typeof(data) == "table" then
if defaultData then
data = merge(defaultData, data)
end

return table.freeze(setmetatable(data, ComponentInstance))
else
component[PRIMITIVE_MARKER] = true
return table.freeze(setmetatable({ data = data, [PRIMITIVE_MARKER] = true }, ComponentInstance))
end
end
Expand Down

0 comments on commit 8e8cf67

Please sign in to comment.