mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Data.json load fix
This commit is contained in:
parent
723338b40e
commit
3ed66f43b4
1 changed files with 3 additions and 3 deletions
|
@ -186,11 +186,11 @@ function ProcessIncomingRequest(recievedData, qdb, infos, dryRun) {
|
|||
// loading stuff
|
||||
function LoadJSON(dataFile) {
|
||||
var data = JSON.parse(utils.ReadFile(dataFile))
|
||||
if (!data.Subjects) {
|
||||
if (!data) {
|
||||
logger.Log(
|
||||
"data.Subjects is undefined! Couldn't load data!",
|
||||
"data is undefined! Couldn't load data!",
|
||||
logger.GetColor('redbg')
|
||||
)
|
||||
}
|
||||
return data.Subjects
|
||||
return data
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue