From 6aaef9df4bd501522bdff8bdd91b151273e93d93 Mon Sep 17 00:00:00 2001 From: Ali BARIN Date: Fri, 12 Jul 2024 08:58:39 +0000 Subject: [PATCH] fix(datastore): stop undefined datastore entry throwing --- packages/backend/src/helpers/global-variable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/helpers/global-variable.js b/packages/backend/src/helpers/global-variable.js index 5f7706f9..843499fc 100644 --- a/packages/backend/src/helpers/global-variable.js +++ b/packages/backend/src/helpers/global-variable.js @@ -98,9 +98,9 @@ const globalVariable = async (options) => { }); return { - key: datastore.key, - value: datastore.value, - [datastore.key]: datastore.value, + key: key, + value: datastore?.value ?? null, + [key]: datastore?.value ?? null, }; }, set: async ({ key, value }) => {