fix: make auth in global variable optional

This commit is contained in:
Ali BARIN
2022-10-08 10:32:34 +02:00
parent 8e972fd875
commit 577abde2e9

View File

@@ -15,16 +15,18 @@ const globalVariable = async (
return {
auth: {
set: async (args: IJSONObject) => {
if (connection) {
await connection.$query().patchAndFetch({
formattedData: {
...connection.formattedData,
...args,
},
});
}
return null;
},
data: connection.formattedData,
data: connection?.formattedData,
},
app: appData,
http: createHttpClient({ baseURL: appData.baseUrl }),