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:
@@ -186,11 +186,11 @@ function ProcessIncomingRequest(recievedData, qdb, infos, dryRun) {
|
|||||||
// loading stuff
|
// loading stuff
|
||||||
function LoadJSON(dataFile) {
|
function LoadJSON(dataFile) {
|
||||||
var data = JSON.parse(utils.ReadFile(dataFile))
|
var data = JSON.parse(utils.ReadFile(dataFile))
|
||||||
if (!data.Subjects) {
|
if (!data) {
|
||||||
logger.Log(
|
logger.Log(
|
||||||
"data.Subjects is undefined! Couldn't load data!",
|
"data is undefined! Couldn't load data!",
|
||||||
logger.GetColor('redbg')
|
logger.GetColor('redbg')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return data.Subjects
|
return data
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user