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

fix(date-picker): add check for calendar before setting #18448

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

annawen1
Copy link
Member

@annawen1 annawen1 commented Jan 27, 2025

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 ensure calendar is not null before setting the properties.

Changelog

Changed

  • add check for calendar before triggering _setCalendar method

Testing / Reviewing

Go to date-picker playground story and check that there is no

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'set')

error showing up in the console

@annawen1 annawen1 requested a review from a team as a code owner January 27, 2025 20:56
Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 5964388
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/6798f053c897c8000882fe0a
😎 Deploy Preview https://deploy-preview-18448--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5964388
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6798f053ccc87f00085fce5c
😎 Deploy Preview https://deploy-preview-18448--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 5964388
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6798f0533610c600086f04ac
😎 Deploy Preview https://deploy-preview-18448--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.16%. Comparing base (9ec6285) to head (5964388).
Report is 3 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@annawen1 annawen1 added the package: @carbon/web-components @carbon/web-components label Jan 28, 2025
@ariellalgilmore ariellalgilmore added this pull request to the merge queue Jan 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: @carbon/web-components @carbon/web-components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: date-picker calendar is null
3 participants