From 854e3d3576b1fd6ef1d758f90d57833bd2bca932 Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Fri, 9 Dec 2022 06:04:59 -0500 Subject: [PATCH] Fix reading value from undefined. (#631) --- ui/media/js/auto-save.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/auto-save.js b/ui/media/js/auto-save.js index f503779a..c1a9ce49 100644 --- a/ui/media/js/auto-save.js +++ b/ui/media/js/auto-save.js @@ -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 }