format.js: if string is undefined, return

This commit is contained in:
Anand Doshi 2014-04-22 20:35:47 +05:30
parent bef7b9740c
commit 1bb395559f

View file

@ -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) {