Skip to content

Commit

Permalink
fix validate called on client
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdotink committed Oct 13, 2023
1 parent 849b11e commit b1093ad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Event/Client.luau
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ local function On<T...>(self: Client<T...>, Callback: (T...) -> ())
assert(not self.Listening, "Event is already listening")
self.Listening = true

ClientEvent.Listen(self.Id, function(...)
if pcall(self.Validate, ...) then
Callback(...)
end
end)
ClientEvent.Listen(self.Id, Callback)
end

local function Client<T...>(Id: string, Validate: (...unknown) -> T...): Client<T...>
Expand Down

0 comments on commit b1093ad

Please sign in to comment.