aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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