From 97907d5d130881c19b6b1a5df51fc99a42a9ff5d Mon Sep 17 00:00:00 2001 From: rxi Date: Mon, 3 Mar 2014 21:08:19 +0000 Subject: [PATCH] Changed lume.format() to abort early if `vars` is nil --- lume.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lume.lua b/lume.lua index d90300f..b55a487 100644 --- a/lume.lua +++ b/lume.lua @@ -231,7 +231,7 @@ end function lume.format(str, vars) - vars = vars or {} + if not vars then return str end local f = function(x) return tostring(vars[x] or "{" .. x .. "}") end return (str:gsub("{(.-)}", f)) end