aboutsummaryrefslogtreecommitdiff
path: root/src/modules/mods.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-06-09 18:15:45 +0200
committer0neGal <mail@0negal.com>2024-06-09 18:23:29 +0200
commit760031c079ce830755ba4fea029e149f4140e00b (patch)
tree8dbb9f8d5bb4e19cdaffb40e8a091b457a597769 /src/modules/mods.js
parent1c1e8fb730b9974cd9b8060499773b0f37ff28d2 (diff)
parent04b0e9fcea6c60257d7bc68994103eacb340a82b (diff)
downloadViper-760031c079ce830755ba4fea029e149f4140e00b.tar.gz
Viper-760031c079ce830755ba4fea029e149f4140e00b.zip
Merge branch 'main' into linux-launch-v2linux-launch-v2
Diffstat (limited to 'src/modules/mods.js')
-rw-r--r--src/modules/mods.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/mods.js b/src/modules/mods.js
index 169e7b1..6214098 100644
--- a/src/modules/mods.js
+++ b/src/modules/mods.js
@@ -350,6 +350,10 @@ mods.modfile.get = (mod) => {
// read enabledmods.json
let data = json(mods.modfile.file);
+ if (! data || typeof data !== "object") {
+ return true;
+ }
+
if (data[mod]) { // enabled
return true;
} else if (data[mod] === false) { // disabled