diff options
author | d9k <d9k@ya.ru> | 2018-05-04 15:14:14 +0300 |
---|---|---|
committer | d9k <d9k@ya.ru> | 2018-05-04 15:18:33 +0300 |
commit | a5ebacddc49660f97bfe5e97e3bdfd264803372f (patch) | |
tree | 6620d7f48c1344fe21182602e33efc7a16d3cbab | |
parent | 8f23fce49593deaab5de6c79598389fe86cd6e84 (diff) | |
download | valua-a5ebacddc49660f97bfe5e97e3bdfd264803372f.tar.gz valua-a5ebacddc49660f97bfe5e97e3bdfd264803372f.tar.bz2 valua-a5ebacddc49660f97bfe5e97e3bdfd264803372f.zip |
optional() stackable function+. fixed warnings locally with `luacheck --codes --std=max *.lua --ignore 211/_ENV`
-rw-r--r-- | valua.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -54,7 +54,8 @@ function valua:new(obj) -- __call will run only when the value is validated self.__call = function(t,value) local res = true - local fres, err = nil + local err = nil + local fres if value == nil and t.allow_nil then return res, err |