Skip to content
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

TypeError: Cannot read properties of undefined (reading 'slice') #169

Closed
blackfalcon opened this issue Nov 29, 2023 · 4 comments
Closed

Comments

@blackfalcon
Copy link
Member

Describe the bug

When running the datepicker in the docsite, there is a JS error that appears in the console. This appears to not be causing any functional issues that are visually noticeable.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://auro.alaskaair.com/components/auro/datepicker
  2. Open the inspector console
  3. Click on the BASIC example datepicker example
  4. Select any date
  5. See the error in the console
auro-datepicker__bundled.js:14814 Uncaught TypeError: Cannot read properties of undefined (reading 'slice')
at Object.getPostDelimiter (auro-datepicker__bundled.js:14814:26)
at Cleave.onChange (auro-datepicker__bundled.js:15343:34)
at AuroInput.notifyValueChanged (auro-datepicker__bundled.js:16230:10)
at AuroInput.updated (auro-datepicker__bundled.js:16113:14)
at AuroInput._$AE (auro-datepicker__bundled.js:12:5221)
at AuroInput.performUpdate (auro-datepicker__bundled.js:12:5000)
at AuroInput.scheduleUpdate (auro-datepicker__bundled.js:12:4581)
at AuroInput._$Ej (auro-datepicker__bundled.js:12:4489)
at async AuroInput._$Ej (auro-datepicker__bundled.js:12:4431)

Expected behavior

Console error should not appear when executing functionality

Screenshots

Screen Shot 2023-11-29 at 12 03 15 PM

Desktop (please complete the following information):

  • OS: [macOS]
  • Browser [Chrome]
  • Version [@latest]

Exit criteria

This issue can be closed once a user can execute the element's feature that not see an error in the console.

@blackfalcon blackfalcon added auro-datepicker not-reviewed Issue has not been reviewed by Auro team members Type: Bug Bug or Bug fixes labels Nov 29, 2023
@jordanjones243
Copy link
Contributor

This error is coming from cleave js from within auro-input and is not something we can fix within our own code. The issue was addressed here, but seems like this fix is no longer valid:

AlaskaAirlines/auro-input#238
AlaskaAirlines/auro-input#256

@blackfalcon
Copy link
Member Author

@jordanjones243 can you please validate if this is still an issue. If it is, please comment, in some detail, as to what was tried to resolve and a potential resolution to address.

@blackfalcon blackfalcon removed the not-reviewed Issue has not been reviewed by Auro team members label May 8, 2024
@Patrick-Daly-AA
Copy link

Requires further investigation to see if this is fixable. Current theory is that Cleave JS is trying to format the text before there is any text.

@Patrick-Daly-AA
Copy link

Determined that this is not worth the issue to fix so long as we are using CleaveJS

@jason-capsule42 jason-capsule42 removed the Type: Bug Bug or Bug fixes label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants