diff options
author | Andrew Dolgov <[email protected]> | 2021-03-10 12:25:52 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-10 12:25:52 +0300 |
commit | e826c9e055b94b9655fa4c571e91dcd330cc3a66 (patch) | |
tree | 9dde0741c69a8f2c4ba5fdba5f1a3f1447df7760 | |
parent | f58879c1dc284a60bce4199ccf05448198498ff4 (diff) |
fix crash in preferences due to headlines-frame missing
-rw-r--r-- | js/App.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |