The check date.constructor.name === 'Moment' in the DateOnly constructor does not work when the library is minified.
For example, in my app, when debugging the minified code, date.constructor.name is 'X', because the minifier has chosen to call Moment X.
One potential fix would be to inspect the _isAMomentObject property, as Moment itself does to check if an object is a Moment.
The check
date.constructor.name === 'Moment'in the DateOnly constructor does not work when the library is minified.For example, in my app, when debugging the minified code,
date.constructor.nameis'X', because the minifier has chosen to call MomentX.One potential fix would be to inspect the
_isAMomentObjectproperty, as Moment itself does to check if an object is a Moment.