From 53fb043d05720bc3f72dad28919a775aadf869c5 Mon Sep 17 00:00:00 2001 From: Tben <52448020+BenjaminToby@users.noreply.github.com> Date: Sat, 24 Jun 2023 14:38:39 +0100 Subject: [PATCH] updates --- client/auth/logout.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/auth/logout.js b/client/auth/logout.js index 2ac1a5a..76493f9 100644 --- a/client/auth/logout.js +++ b/client/auth/logout.js @@ -52,7 +52,7 @@ module.exports = async function logout(params) { //////////////////////////////////////// const cookies = parseClientCookies(); - const socialId = cookies.datasquirel_social_id; + const socialId = cookies?.datasquirel_social_id && typeof cookies.datasquirel_social_id == "string" && !cookies.datasquirel_social_id.match(/^null$/i) ? cookies.datasquirel_social_id : null; //////////////////////////////////////// //////////////////////////////////////// @@ -75,7 +75,7 @@ module.exports = async function logout(params) { ////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// - if (socialId) { + if (socialId && !socialId?.match(/^null$/i)) { const googleClientId = params?.googleClientId; if (googleClientId) { @@ -110,6 +110,8 @@ module.exports = async function logout(params) { //////////////////////////////////////// } }; + } else { + resolve(true); } //////////////////////////////////////// diff --git a/package.json b/package.json index 8825368..bc76adb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.1.51", + "version": "1.1.52", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": {