You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thank you for this package.
Could you please check if this is a bug.
I am trying to escape a message pattern argument using single quotes. The argument is defined as index in curly braces.
The problem is I have no luck to obtain the message that contains the unchanged pattern.
Short code:
...
`Globalize.loadMessages({
en: {
escaped: "Escaped '{0}'"
}
});
Globalize.locale( "en" );
var escaped = Globalize.messageFormatter( "escaped" );
console.log( escaped() ); // here "Escaped {0}" is expected, but got "Cannot read property '0' of undefined"
`
...
Output with error:
return function(d) { return "Escaped '" + d["0"] + "'"; }
^
TypeError: Cannot read property '0' of undefined
at eval (eval at MessageFormat.compile (D:\skre\projects\JavaScript\Globalize\EscapeTest\node_modules\globalize\dist\globalize\message.js:1820:13), :3:44)
Thank you.
The text was updated successfully, but these errors were encountered:
Hello, thank you for this package.
Could you please check if this is a bug.
I am trying to escape a message pattern argument using single quotes. The argument is defined as index in curly braces.
The problem is I have no luck to obtain the message that contains the unchanged pattern.
Short code:
...
`Globalize.loadMessages({
en: {
escaped: "Escaped '{0}'"
}
});
Globalize.locale( "en" );
var escaped = Globalize.messageFormatter( "escaped" );
console.log( escaped() ); // here "Escaped {0}" is expected, but got "Cannot read property '0' of undefined"
`
...
Output with error:
return function(d) { return "Escaped '" + d["0"] + "'"; }
^
TypeError: Cannot read property '0' of undefined
at eval (eval at MessageFormat.compile (D:\skre\projects\JavaScript\Globalize\EscapeTest\node_modules\globalize\dist\globalize\message.js:1820:13), :3:44)
Thank you.
The text was updated successfully, but these errors were encountered: