We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug It seems like when a string value is stored, it's being stored with additional quotes around the string.
To Reproduce Steps to reproduce the behavior:
computed: { applicationTheme: preference('applicationTheme', { defaultValue: 'default' }), }
methods: { toggleDarkTheme() { this.applicationTheme = this.applicationTheme === 'default' ? 'dark' : 'default'; } }
const applicationTheme = localStorage.getItem("applicationTheme"); // Value is equal to "default" or "dark", not default or dark
Expected behavior The value shouldn't be surrounded by quotes.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
@joshmakar I don't think the issue is that the value is surrounded by quotes. Did you try to use the get() method to retrieve the value?
get()
toggleDarkTheme() { const currentTheme = preference("applicationTheme").get(); preference("applicationTheme").set( currentTheme === "default" ? "dark" : "default" ); },
Sorry, something went wrong.
No branches or pull requests
Describe the bug
It seems like when a string value is stored, it's being stored with additional quotes around the string.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The value shouldn't be surrounded by quotes.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: