Open anchpop opened 7 years ago
same problem
🆙
EDIT:
Solved by serializing and deserializing (with format
and parse
)
as an alternative to momentjs, there is luxon, which is an immutable, date time library that is somewhat of a subset of momentjs. It is still part of the momentjs family of libraries however
Similar to @rkkautsar my work around involved NOT storing moment
objects but instead storing strings. It's a bit of a pain to convert them back and forth using format
and parse
and would love to see this implemented.
Hi, I'm using moment.js
When putting the moment object (returned by
moment()
) in a Immutable datastructure, it gets broken and essential features like.format()
mysteriously quit working. Confusingly, the functionmoment.isMoment()
still returnstrue
, despite not being able to use it like a moment object at all.I believe this is related to #25 . Any thoughts on getting moment objects classified like react objects and dates, so they won't have their prototypes stripped (which is what I believe is happening)?