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

Uncaught TypeError: Cannot convert undefined or null to object - When trying to change theme using local state(Toggling between 'dark' and 'light' ). #81

Open
sachinpardeshi01 opened this issue Jul 19, 2019 · 0 comments

Comments

@sachinpardeshi01
Copy link

Uncaught TypeError: Cannot convert undefined or null to object
When trying to change theme using local state(Toggling between 'dark' and 'light' ) gives error and UI breaks when loading page with new theme.

To Reproduce
Steps to reproduce the behavior:

  1. Create dropdown to choose between themes (values ['dark', 'light'])
  2. Add onchange handler which will toggle value between dark and light.
  3. pass this theme string in state to getTheme [ Imported from 'react-uwp/Theme'] to change theme dyanamically.
  4. On dropdown change this error fired.

Expected behavior
It should allow to change theme dyanamically.

Additional context
Toggle state between 'dark' and 'light' and passing it to getTheme for react-uwp/theme causes error breaking the UI.

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

No branches or pull requests

1 participant