fixed small issue that could occur with wrong evaluated parameters
This commit is contained in:
parent
bec0d05847
commit
5c75ba9468
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user