-
-
Notifications
You must be signed in to change notification settings - Fork 474
🛠️FIX : Uncaught Runtime Error Prevents Local Development #560
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@madhukalita please review and merge the PR . |
|
Hi there! This issue is still open. We are looking forward to your response. |
9 similar comments
|
Hi there! This issue is still open. We are looking forward to your response. |
|
Hi there! This issue is still open. We are looking forward to your response. |
|
Hi there! This issue is still open. We are looking forward to your response. |
|
Hi there! This issue is still open. We are looking forward to your response. |
|
Hi there! This issue is still open. We are looking forward to your response. |
|
Hi there! This issue is still open. We are looking forward to your response. |
|
Hi there! This issue is still open. We are looking forward to your response. |
|
Hi there! This issue is still open. We are looking forward to your response. |
|
Hi there! This issue is still open. We are looking forward to your response. |
Description
After forking and cloning the repository, I encountered a major issue while setting up the local environment. Upon running npm install and npm start, I received an uncaught runtime error.
To resolve this, you can modify your code to handle the case where the stored theme is a simple string instead of a JSON string. Here's how you can do that:
Retrieving the theme: Instead of using JSON.parse, you directly retrieve the item from local storage.
Checking for storedTheme: If storedTheme is not null (meaning there is a value stored), it will return that value directly, which should be either "dark" or "light".
Fallback: If there’s no stored theme, it defaults to checking the document's class to determine the current theme.
This approach avoids any JSON parsing issues and should fix the "Unexpected token 'd'" error.
I fixed that.
Related Issues
Fixes : #489
Changes Proposed
Changed some line of code on Sidebar.jsx
Checklist
Screenshots
Before
record_000002.mp4
After
record_000003.mp4