fix ret_code option check

This commit is contained in:
alteredCoder 2022-03-31 18:24:46 +02:00
parent 10a3d510c1
commit eb5de9c364

View file

@ -12,7 +12,7 @@ function M.new(template_path, redirect_location, ret_code)
M.redirect_location = redirect_location
ret_code_ok = false
if ret_code ~= nil and ret_code ~= 0 then
if ret_code ~= nil and ret_code ~= 0 and ret_code ~= "" then
for k, v in pairs(utils.HTTP_CODE) do
if k == ret_code then
M.ret_code = utils.HTTP_CODE[ret_code]