webmcp
diff framework/env/format/timestamp.lua @ 530:6dec66f8d48e
Fix in format.timestamp(...): deal with options set to nil
author | jbe |
---|---|
date | Fri Dec 01 00:16:36 2017 +0100 (2017-12-01) |
parents | 08c107cc4fce |
children |
line diff
1.1 --- a/framework/env/format/timestamp.lua Sun Nov 26 16:10:45 2017 +0100 1.2 +++ b/framework/env/format/timestamp.lua Fri Dec 01 00:16:36 2017 +0100 1.3 @@ -14,7 +14,7 @@ 1.4 1.5 function format.timestamp(value, options) 1.6 if value == nil then 1.7 - return options.nil_as or "" 1.8 + return options and options.nil_as or "" 1.9 end 1.10 return format.date(value, options) .. " " .. format.time(value, options) 1.11 end