mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-14 10:15:31 +02:00
Merge main
This commit is contained in:
@ -282,9 +282,11 @@ function tryLoadOldSettings() {
|
||||
Object.keys(individual_settings_map).forEach(localStorageKey => {
|
||||
var localStorageValue = localStorage.getItem(localStorageKey);
|
||||
if (localStorageValue !== null) {
|
||||
var setting = SETTINGS[individual_settings_map[localStorageKey]]
|
||||
if (setting == null || setting == undefined) {
|
||||
return
|
||||
let key = individual_settings_map[localStorageKey]
|
||||
var setting = SETTINGS[key]
|
||||
if (!setting) {
|
||||
console.warn(`Attempted to map old setting ${key}, but no setting found`);
|
||||
return null;
|
||||
}
|
||||
if (setting.element.type == "checkbox" && (typeof localStorageValue === "string" || localStorageValue instanceof String)) {
|
||||
localStorageValue = localStorageValue == "true"
|
||||
|
Reference in New Issue
Block a user