Commit afe26b90 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

escape undefined to empty string

parent 6cbe4b9d
......@@ -39,7 +39,9 @@ handlebars.registerHelper('n', function(object){
// escapes so that the object can go in a double quote (") string
handlebars.registerHelper('e', function(object){
let s = stringify(object)
if (!s.startsWith('"'))
if (s === undefined)
s = '""'
else if (!s.startsWith('"'))
s = stringify(s)
return new handlebars.SafeString(s.slice(1, s.length-1))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment