-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix(date-picker): add check for calendar before setting #18448
base: main
Are you sure you want to change the base?
fix(date-picker): add check for calendar before setting #18448
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18448 +/- ##
=======================================
Coverage 84.16% 84.16%
=======================================
Files 408 408
Lines 14449 14449
Branches 4696 4696
=======================================
Hits 12161 12161
+ Misses 2124 2123 -1
- Partials 164 165 +1 ☔ View full report in Codecov by Sentry. |
Closes #18182
Error in console appears when
calendar
is not instantiated but properties are passed in to the date-picker component. This PR adds a check to ensurecalendar
is not null before setting the properties.Changelog
Changed
calendar
before triggering_setCalendar
methodTesting / Reviewing
Go to
date-picker
playground story and check that there is noUncaught (in promise) TypeError: Cannot read properties of null (reading 'set')
error showing up in the console