Fix reading value from undefined. (#631)

This commit is contained in:
Marc-Andre Ferland 2022-12-09 06:04:59 -05:00 committed by GitHub
parent ba2c966329
commit 854e3d3576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ function loadSettings() {
var saved_settings_text = localStorage.getItem(SETTINGS_KEY)
if (saved_settings_text) {
var saved_settings = JSON.parse(saved_settings_text)
if (saved_settings.find(s => s.key == "auto_save_settings").value == false) {
if (saved_settings.find(s => s.key == "auto_save_settings")?.value == false) {
setSetting("auto_save_settings", false)
return
}