HealthCatalyst / Fabric.Cashmere

Health Catalyst’s comprehensive design system.
http://cashmere.healthcatalyst.net
Apache License 2.0
66 stars 76 forks source link

TypeError: Cannot read properties of undefined (reading '_hideOverride') #2262

Open amaury14 opened 8 months ago

amaury14 commented 8 months ago

Summary

When closing a cashmere tab and selecting a tab by the index an error occurs. TypeError: Cannot read properties of undefined (reading '_hideOverride')

Additional context File: healthcatalyst-cashmere.mjs line 19549.

Function: /** Sets the currently selected tab by either its numerical index orTabComponent` object.

The error seems to be in this line: if (tab === -1 || activeTab._hideOverride) { activeTab is undefined.

Original call this.templateTabSet.selectTab(index, true)

Suggested Fix Checking the activeTab object before using it or adding ? when calling the _hideOverride property.