From e826c9e055b94b9655fa4c571e91dcd330cc3a66 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 10 Mar 2021 12:25:52 +0300 Subject: fix crash in preferences due to headlines-frame missing --- js/App.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js/App.js') diff --git a/js/App.js b/js/App.js index 78784f3a7..e19b3e878 100644 --- a/js/App.js +++ b/js/App.js @@ -514,7 +514,13 @@ const App = { this.LABEL_BASE_INDEX = parseInt(params[k]); break; case "cdm_auto_catchup": - App.byId("headlines-frame").setAttribute("data-auto-catchup", params[k] ? "true" : "false"); + { + const headlines = App.byId("headlines-frame"); + + // we could be in preferences + if (headlines) + headlines.setAttribute("data-auto-catchup", params[k] ? "true" : "false"); + } break; case "hotkeys": // filter mnemonic definitions (used for help panel) from hotkeys map -- cgit v1.2.3