Closed
Description
Describe the bug
There is an bug, which causes an error Cannot read properties of null (reading 'constructor')
when null is passed to dayjs function while objectSupport plugin is enabled e.g. dayjs(null)
Expected behavior
dayjs function should execute and create date object with Invalid Date.
Information
Day.js Version 1.11.7
OS: Ubuntu Linux
Browser - chrome
Fix
Change this line to
&& !proto.$utils().u(obj) && obj !== null && (obj.constructor.name === 'Object');