Skip to content

'ReferenceError: Date is not defined' with Babel (Includes fix) #46

@builtbybrayne

Description

@builtbybrayne

v3.0.2

I got ReferenceError: Date is not defined when calling reset().

My tests are Babel-compiled on the fly, and I believe this breaks the link between the Date reference and the actual global.Date class.

I have a fix, and would offer a PR but I'm not familiar with typescript.

I did copy your earlier js version (27a1a73 - Remove Dead Code) and replaced all Date references with global.Date. This works fine.

(Also, by the way, when you merged your ts branch, you accidentally undid the removal of the dead code in the mentioned commit).

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