Add type check for http.checkURL

This commit is contained in:
Jonathan Coates 2021-07-15 13:04:44 +01:00
parent 56d8a5d585
commit 82ca19c296
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
1 changed files with 1 additions and 0 deletions

View File

@ -681,6 +681,7 @@ if http then
local nativeCheckURL = http.checkURL
http.checkURLAsync = nativeCheckURL
http.checkURL = function(_url)
expect(1, _url, "string")
local ok, err = nativeCheckURL(_url)
if not ok then return ok, err end