Skip to content

Commit

Permalink
fixed error when enabledmods.json cant be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
0neGal committed May 31, 2024
1 parent 271d6e8 commit 9f7a4cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/mods.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f7a4cf

Please sign in to comment.