-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dayjs(null)
throws error, not return dayjs object as invalid date
#2095
Comments
+1 to this one Was also affected by this when date passed to As a workaround - introduced a nullish check. |
We ran into this today as well. Passed a |
+1 |
🎉 This issue has been resolved in version 1.11.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
dayjs(null)
is throws error, 'Uncaught TypeError: can't access property "constructor", n is null'.It says that error occured on dayjs/plugin/objectSupport.js
Expected behavior
It should be return dayjs object with invalid date. (it means,
dayjs(null).isValid()
return false correctly.)Information
The text was updated successfully, but these errors were encountered: