Skip to content
Snippets Groups Projects
Commit afe26b90 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

escape undefined to empty string

parent 6cbe4b9d
No related branches found
No related tags found
No related merge requests found
......@@ -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))
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment