Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fromNow() results Cannot read property 'replace' of undefined #2783

Open
Stas-Buzunko opened this issue Dec 5, 2024 · 0 comments
Open

fromNow() results Cannot read property 'replace' of undefined #2783

Stas-Buzunko opened this issue Dec 5, 2024 · 0 comments

Comments

@Stas-Buzunko
Copy link

Describe the bug

const shiftStart = dayjs(notification.shift.date).minute(
  notification.shift.shift.start
)

if (shiftStart.isValid() && shiftStart.isAfter(dayjs())) {
  shiftInValue = shiftStart.fromNow()
}

Cannot read property 'replace' of undefined. Error points to relativeTime.js file

Expected behavior
No error

Information

  • Day.js Version 1.11.13
  • OS: [e.g. iOS] - Android and iOS, more often Android
  • React-native 0.76.3
  • Node.js v18.20.4
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant