From 7f491ea54db2eb6324423a896a3166919c229eb9 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 8 May 2026 02:08:37 +0200 Subject: [PATCH] Improve error handling when saving cookie source settings --- ui/renderer.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ui/renderer.js b/ui/renderer.js index b985128..c23dff2 100644 --- a/ui/renderer.js +++ b/ui/renderer.js @@ -406,14 +406,18 @@ window.addEventListener('DOMContentLoaded', async () => { } function saveSettingsCookieSource() { - const source = sourceFromFields( - youtubeCookieSourceSelect, - youtubeCookieProfileInput, - youtubeCookieContainerInput, - youtubeCookieKeyringSelect, - youtubeCookieFileInput - ); - saveYoutubeCookieSource(source); + try { + const source = sourceFromFields( + youtubeCookieSourceSelect, + youtubeCookieProfileInput, + youtubeCookieContainerInput, + youtubeCookieKeyringSelect, + youtubeCookieFileInput + ); + saveYoutubeCookieSource(source); + } catch { + saveYoutubeCookieSource(null); + } } function openCookieDialog(message) {