Skip to content
Snippets Groups Projects
Commit b376fc49 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Guard against Seen being undefined when saving config.

parent 5bf7a847
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -1441,6 +1441,7 @@ function save_cfg(lck) ...@@ -1441,6 +1441,7 @@ function save_cfg(lck)
lock_cfg(); lock_cfg();
cfgfile.rewind(); cfgfile.rewind();
for(sub in saved_config) { for(sub in saved_config) {
if (saved_config[sub].Seen !== undefined) {
scpy = JSON.parse(JSON.stringify(saved_config[sub].Seen)); scpy = JSON.parse(JSON.stringify(saved_config[sub].Seen));
s=saved_config[sub].Seen; s=saved_config[sub].Seen;
delete saved_config[sub].Seen; delete saved_config[sub].Seen;
...@@ -1457,6 +1458,7 @@ function save_cfg(lck) ...@@ -1457,6 +1458,7 @@ function save_cfg(lck)
} }
saved_config[sub].Seen=scpy; saved_config[sub].Seen=scpy;
} }
}
cfgfile.flush(); cfgfile.flush();
if (lck) if (lck)
unlock_cfg(); unlock_cfg();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment