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: Prevent errors during access to property of undefined object. #955

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

Amoyaw-Curtis
Copy link
Contributor

Context

init.ts:127 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'tier')
    at init (init.ts:127:1)
    at async initDemo (initDemo.js:11:1)
    at async initializeDicomViewer (cornerstone3D.tsx:13:1)

Changes & Results

Added optional chaining to resolve the issue of access to property of undefined object.

Before:

sc1

After:

sc2

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] "OS: Windows 10
  • [] "Node version: 20.10.0
  • [] "Browser: Chrome Version 120.0.6099.109 (Official Build) (64-bit)

Copy link

netlify bot commented Dec 19, 2023

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 1c49649
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/6580fbc749ae8c0008c5125e
😎 Deploy Preview https://deploy-preview-955--cornerstone-3d-docs.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.

@sedghi sedghi merged commit f15a218 into cornerstonejs:main Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants