format.js: if string is undefined, return
This commit is contained in:
parent
bef7b9740c
commit
1bb395559f
1 changed files with 2 additions and 0 deletions
|
|
@ -1,4 +1,6 @@
|
|||
function format (str, args) {
|
||||
if(str==undefined) return str;
|
||||
|
||||
this.unkeyed_index = 0;
|
||||
return str.replace(/\{(\w*)\}/g, function(match, key) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue