-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix issue #321 - load defaults, then localStorage, then url config #322
Conversation
components/Editor.js
Outdated
} | ||
} | ||
this.setState({ | ||
...this.state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to include this.state
in setState
(:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Derp. Haha. Yeah you're right. One sec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@stevensacks thanks so much no idea why I didn't write it like this the first time. Way better. @briandennis see any issues? |
Second set of eyes always helps. :) Great tool! Happy to help make it just a little bit better. Now, I want to add Darcula theme (you have Dracula, but Darcula is better, IMO). |
Let me know when it's deployed! |
Description
For IDEs that allow you to open selected code in Carbon, they only pass the language and the code. To avoid losing your localStorage config, the settings should be merged in the following order:
This ensures that all required config is present and that url params trump all.