Open ahumphreys87 opened 3 years ago
Current Behavior In SPA applications that use React Router, it will append a #/ to the hash router. This is causing: https://github.com/adobe/aem-core-wcm-components/blob/master/content/src/content/jcr_root/apps/core/wcm/components/tabs/v1/tabs/clientlibs/site/js/tabs.js#L328 to throw a JS error.
#/
Expected behavior/code No JS error should appear when using the react hash router.
Environment
Possible Solution Updating https://github.com/adobe/aem-core-wcm-components/blob/master/content/src/content/jcr_root/apps/core/wcm/components/tabs/v1/tabs/clientlibs/site/js/tabs.js#L326 to if (location.hash && location.hash !== "#" && location.hash !== "#/") {
if (location.hash && location.hash !== "#" && location.hash !== "#/") {
Additional context / Screenshots n/a
@richardhand just wondering if you think my fix here would be ok? Im happy to open a PR for it if so
Bug Report
Current Behavior In SPA applications that use React Router, it will append a
#/
to the hash router. This is causing: https://github.com/adobe/aem-core-wcm-components/blob/master/content/src/content/jcr_root/apps/core/wcm/components/tabs/v1/tabs/clientlibs/site/js/tabs.js#L328 to throw a JS error.Expected behavior/code No JS error should appear when using the react hash router.
Environment
Possible Solution Updating https://github.com/adobe/aem-core-wcm-components/blob/master/content/src/content/jcr_root/apps/core/wcm/components/tabs/v1/tabs/clientlibs/site/js/tabs.js#L326 to
if (location.hash && location.hash !== "#" && location.hash !== "#/") {
Additional context / Screenshots n/a