scania / corporate-ui

This repo will be archived in Q3 2021, please visit https://github.com/scania-digital-design-system
https://digitaldesign.scania.com/
25 stars 15 forks source link

Bug - Switching Theme cause errors in the console #583

Closed mmexvr closed 3 years ago

mmexvr commented 3 years ago

Describe the bug
A clear and concise description of what the bug is. When switching between themes( for example removing) scania-theme error appears regarding the version of the theme and icons that are undefined. Right now the there is a scania-theme-version attribute that will cause error, since if scania-theme isn't used there is no version for it.

Another problem related with the icons appear, because if you use just corporate-ui without theme it will give error trying to find out the height and width of icon, since we don't have a theme.

To Reproduce
Steps to reproduce the behavior:

  1. Go to digitaldesign.scania.com
  2. Click on f12
  3. Change scania-theme from to empty
  4. See error in the console.log

Expected behavior
A clear and concise description of what you expected to happen. No errors

Screenshots
If applicable, add screenshots to help explain your problem. image

Desktop information:
Please complete the following information

Additional infomration: Saw the errors after working with #582