Prosody IM 0.11


changeset 5798ab735619 0.11

util.interpolation: Fix combination of filters and fallback values #1623

author
Kim Alvefur
date
parents
children
files

1 files changed, 2 insertions(+), 2 deletions(-)

↓ Download patch

--- a/util/interpolation.lua	Tue Jan 12 13:25:08 2021 +0100
+++ b/util/interpolation.lua	Mon Jan 25 20:58:11 2021 +0100
@@ -43,11 +43,11 @@
 				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