Ensure debug switches match loaded options (#11721)

This commit is contained in:
Josh Hawkins 2024-06-03 09:51:23 -05:00 committed by GitHub
parent b763754723
commit f65ddccd6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,10 +162,12 @@ export default function ObjectSettingsView({
</div>
</div>
<Switch
key={param}
key={`${param}-${optionsLoaded}`}
className="ml-1"
id={param}
checked={options && options[param]}
checked={
optionsLoaded ? options && options[param] : false
}
onCheckedChange={(isChecked) => {
handleSetOption(param, isChecked);
}}