Fixed scoping issue in previous commit

This commit is contained in:
Jason Perkins 2014-03-10 18:35:59 -04:00
parent 883bfcd48d
commit e1fa699109

View File

@ -696,8 +696,9 @@
error({ msg="expected string; got table" })
end
if value then
local value, err = api.checkvalue(value, field)
if value ~= nil then
local err
value, err = api.checkvalue(value, field)
if err then
error { msg=err }
end