fix crash on missing props to string_template() (#1523)
Patched up `make_node()` without `orig`. There may be other cases where `start` could be missing, so make it print "undefined" instead of crashing. fixes #1518
This commit is contained in:
@@ -185,7 +185,7 @@ function push_uniq(array, el) {
|
||||
|
||||
function string_template(text, props) {
|
||||
return text.replace(/\{(.+?)\}/g, function(str, p){
|
||||
return props[p];
|
||||
return props && props[p];
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user