fixed small issue that could occur with wrong evaluated parameters

This commit is contained in:
Jan Schmidle 2013-02-08 16:17:24 +01:00
parent bec0d05847
commit 5c75ba9468

View File

@ -236,7 +236,7 @@ function patternLayout (pattern, tokens) {
replacement = "%"; replacement = "%";
break; break;
case "x": case "x":
if(tokens[specifier]) { if(typeof(tokens[specifier]) !== 'undefined') {
if(typeof(tokens[specifier]) === 'function') { if(typeof(tokens[specifier]) === 'function') {
replacement = tokens[specifier](); replacement = tokens[specifier]();
} else { } else {