Skip to content

Commit 9408ff4

Browse files
authored
fix access.ini permissions (#2867)
these ids may not exist (eg canAddTorrentsWithResume = no)
1 parent 4a52ffe commit 9408ff4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

js/content.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ function makeContent() {
204204
[
205205
"not_add_path", "torrents_start_stopped",
206206
"fast_resume", "randomize_hash",
207-
].forEach(ele => $$(ele).checked = !!theWebUI.settings["webui." + ele]);
207+
].filter(ele => $$(ele)).forEach(ele => $$(ele).checked = !!theWebUI.settings["webui." + ele]);
208208
});
209209

210210
// save add torrent options before closing dialog window
211211
theDialogManager.setHandler("tadd", "beforeHide", () => {
212212
[
213213
"not_add_path", "torrents_start_stopped",
214214
"fast_resume", "randomize_hash",
215-
].forEach(ele => theWebUI.settings["webui." + ele] = $$(ele).checked);
215+
].filter(ele => $$(ele)).forEach(ele => theWebUI.settings["webui." + ele] = $$(ele).checked);
216216
theWebUI.save();
217217
});
218218

0 commit comments

Comments
 (0)