Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Commit 6f32ec9

Browse files
committed
Replace IIFE with if expression
1 parent a1d316d commit 6f32ec9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Components/ListItem.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,7 @@ function Item:render()
8585
Size = UDim2.new(1, -40, 1, 0),
8686
Text = props.IsInput and (props.TextBoxText or "") or sourceText,
8787
AutoLocalize = false,
88-
ClearTextOnFocus = (function()
89-
if props.IsInput then
90-
return props.ClearTextOnFocus
91-
else
92-
return nil
93-
end
94-
end)(),
88+
ClearTextOnFocus = if props.IsInput then props.ClearTextOnFocus else nil,
9589
RichText = props.RichText and not props.IsInput,
9690
PlaceholderText = props.IsInput and sourceText or nil,
9791
PlaceholderColor3 = props.IsInput and theme:GetColor("DimmedText") or nil,

0 commit comments

Comments
 (0)