diff options
author | Kim Alvefur <zash@zash.se> | 2021-01-25 20:58:11 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-01-25 20:58:11 +0100 |
commit | 206be83885d844eb76f5dc33e14f2f435a7d3f65 (patch) | |
tree | 1ab23c40a87207f5ab13a1b82da6e808fc357b5c /util | |
parent | 0303e09dbbb075eb792019956dd4964db075bd24 (diff) | |
download | prosody-origin/vault/0.11.tar.gz prosody-origin/vault/0.11.zip |
util.interpolation: Fix combination of filters and fallback values #1623origin/vault/0.11
Diffstat (limited to 'util')
-rw-r--r-- | util/interpolation.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/interpolation.lua b/util/interpolation.lua index e0ccf47b..3e1f8c4a 100644 --- a/util/interpolation.lua +++ b/util/interpolation.lua @@ -43,11 +43,11 @@ local function new_render(pat, escape, funcs) end end if funcs then - while value ~= nil and opt == '|' do + while opt == '|' do local f; f, raw, opt, e = s_match(block, "^([%a_][%w_.]*)(!?)(%p?)()", e); f = funcs[f]; - if f then value = f(value); end + if value ~= nil and f then value = f(value); end end end if opt == '#' or opt == '%' then |