Skip to content

Commit

Permalink
fix(client/requestModel): model validation and streaming request (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
solareon authored Jul 1, 2024
1 parent abad423 commit e12a7fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imports/requestModel/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ function lib.requestModel(model, timeout)
if type(model) ~= 'number' then model = joaat(model) end
if HasModelLoaded(model) then return model end

if not IsModelValid(model) then
if not IsModelValid(model) and not IsModelInCdimage(model) then
error(("attempted to load invalid model '%s'"):format(model))
end

return lib.streamingRequest(IsModelInCdimage, HasModelLoaded, 'model', model, timeout)
return lib.streamingRequest(RequestModel, HasModelLoaded, 'model', model, timeout)
end

return lib.requestModel

0 comments on commit e12a7fd

Please sign in to comment.