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
In previous version I was able to do formatting with apostrophe inside like
moment().format("MMM 'YY")
moment().format('MMM 'YY')
With 2.0 version I get
SyntaxError: Unexpected string
arguments: Array[0]
get message: function () { [native code] }
get stack: function () { [native code] }
set message: function () { [native code] }
set stack: function () { [native code] }
type: "unexpected_token_string" proto: Error
The text was updated successfully, but these errors were encountered:
Hmm, probably because we switched to a new Function(string) based formatter for better performance. Looks like we're not escaping strings correctly here.
I'll add some tests and this should go in the 1.7.1 release.
In previous version I was able to do formatting with apostrophe inside like
moment().format("MMM 'YY")
moment().format('MMM 'YY')
With 2.0 version I get
SyntaxError: Unexpected string
arguments: Array[0]
get message: function () { [native code] }
get stack: function () { [native code] }
set message: function () { [native code] }
set stack: function () { [native code] }
type: "unexpected_token_string"
proto: Error
The text was updated successfully, but these errors were encountered: