iamkun / iamkun/dayjs

Cant add isSameOrAfter plugin: Cannot read property '$i' of undefined

Open
#1,494 10 comments 6 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

```html


```

```javascript

dayjs.extend(window.isSameOrAfter);

```

```javascript
Uncaught TypeError: Cannot read property '$i' of undefined
at Function.v.extend (dayjs.min.js:1)
at register:724
```

**Expected behavior**
no error

**Information**
- Day.js Version 1.10.4
- OS: [e.g. iOS]
- Browser chrome
- Time zone: [Asia Singapore]

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Chrome using the Day.js 1.10.4 and isSameOrAfter CDN script tags shown in the report, then inspect the dayjs.extend(window.isSameOrAfter) call. Confirm the cause of the undefined plugin and verify that the corrected browser setup loads without an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.