Skip to content

Passing Moment to constructor does not work when DateOnly lib is minified #6

@mdsharpe

Description

@mdsharpe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions