forked from extern/easydiffusion
Fix - setting can be null sometimes (autosave)
This commit is contained in:
parent
e252c9ac05
commit
ab6ec3a9b7
@ -276,7 +276,7 @@
|
||||
<script src="media/js/utils.js?v=5"></script>
|
||||
<script src="media/js/inpainting-editor.js?v=1"></script>
|
||||
<script src="media/js/image-modifiers.js?v=3"></script>
|
||||
<script src="media/js/auto-save.js?v=2.2"></script>
|
||||
<script src="media/js/auto-save.js?v=2.3"></script>
|
||||
<script src="media/js/main.js?v=5"></script>
|
||||
<script src="media/js/themes.js?v=2"></script>
|
||||
<script>
|
||||
|
@ -277,6 +277,9 @@ function tryLoadOldSettings() {
|
||||
var localStorageValue = localStorage.getItem(localStorageKey);
|
||||
if (localStorageValue !== null) {
|
||||
var setting = SETTINGS[individual_settings_map[localStorageKey]]
|
||||
if (setting == null || setting == undefined) {
|
||||
return
|
||||
}
|
||||
if (setting.element.type == "checkbox" && (typeof localStorageValue === "string" || localStorageValue instanceof String)) {
|
||||
localStorageValue = localStorageValue == "true"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user