Skip to content

Commit

Permalink
Return the path_or_nil for custom functions
Browse files Browse the repository at this point in the history
  • Loading branch information
benwilber committed May 19, 2024
1 parent 6d7a54e commit 74a5bd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions valid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local function defaultfunc(val)
end

local function callfunc(func, val)
local is_valid, val_or_err, badval_or_nil = func(val)
local is_valid, val_or_err, badval_or_nil, path_or_nil = func(val)

if val_or_err == nil then
if is_valid then
Expand All @@ -20,7 +20,7 @@ local function callfunc(func, val)
end
end

return is_valid, val_or_err, badval_or_nil
return is_valid, val_or_err, badval_or_nil, path_or_nil
end

local function literal(lit, opts)
Expand Down

0 comments on commit 74a5bd7

Please sign in to comment.