From b942dd73cd6b674cc4d85cd7c727c28b83de3121 Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Mon, 25 Jul 2022 19:07:13 +0200 Subject: [PATCH] initialize settings as empty object instead of "null" --- routes/api/all.js | 1 + 1 file changed, 1 insertion(+) diff --git a/routes/api/all.js b/routes/api/all.js index 810c419..809ab13 100644 --- a/routes/api/all.js +++ b/routes/api/all.js @@ -41,6 +41,7 @@ module.exports = { res.locals.publicKey = result[0].User_PublicKey || "" res.locals.privateKey = result[0].User_PrivateKey || "" res.locals.settings = result[0].User_Settings || {} + if(res.locals.settings == null)res.locals.settings = {} next() } else { res.status(400)