iamkun / iamkun/dayjs

v1.8.26 breaks in constructing Dayjs instance with the second parameter

Open
#892 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Calling dayjs(value, null) could breaks in the latest version v1.8.26 since null is also typeof object.

**Related code diff**
`https://github.com/iamkun/dayjs/compare/v1.8.25...v1.8.26#diff-1fdf421c05c1140f6d71444ea2b27638L36-R36`

I understand that its perrferred to pass in `undefined` rather than `null` to identify the undefined parseformat, however, the update shouldnt break the old feasible usage.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.