iamkun / iamkun/dayjs

Crash React Native: Cannot convert undefined value to object

Open
#2,476 0 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**
I'm getting this error when I added week plugin `dayjs.extend(weekOfYear)` and run `dayjs().format('dddd')` (same as ddd, dd, MM, MMM, MMM)
```
//index.js file
import dayjs from 'dayjs';
dayjs.extend(weekOfYear);
dayjs.locale('en', { weekStart: 0 });
```
**Expected behavior**
Can use format() function as usual.

**Information**
- Day.js Version 1.11.10
- OS: IOS 16.4
- react-native: 0.72.4

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.