Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions json2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,13 @@ var json2html = {
var out = '';

var val = transform[key];
var type = typeof val;

var type = typeof val;
if (type === 'function') {
val = val.call(obj,obj,index);
}
type = typeof val;
if (type === 'function') {
return(val.call(obj,obj,index));
return val.call(obj,obj,index);
} else if (type === 'string') {
var _tokenizer = new json2html._tokenizer([
/\$\{([^\}\{]+)\}/
Expand Down