🐛(frontend) default noise reduction to disabled for existing users
Prevent React warnings about uncontrolled/controlled components by ensuring lk-user-choice store initializes with default value when noise reduction setting is missing from existing localStorage.
This commit is contained in:
committed by
aleb_the_flash
parent
3de4cc01dc
commit
b407bfda07
@@ -12,7 +12,10 @@ export type LocalUserChoices = LocalUserChoicesLK & {
|
||||
}
|
||||
|
||||
function getUserChoicesState(): LocalUserChoices {
|
||||
return loadUserChoices()
|
||||
return {
|
||||
noiseReductionEnabled: false,
|
||||
...loadUserChoices(),
|
||||
}
|
||||
}
|
||||
|
||||
export const userChoicesStore = proxy<LocalUserChoices>(getUserChoicesState())
|
||||
|
||||
Reference in New Issue
Block a user