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 = "%";
break;
case "x":
if(tokens[specifier]) {
if(typeof(tokens[specifier]) !== 'undefined') {
if(typeof(tokens[specifier]) === 'function') {
replacement = tokens[specifier]();
} else {