fix: make auth in global variable optional
This commit is contained in:
@@ -15,16 +15,18 @@ const globalVariable = async (
|
|||||||
return {
|
return {
|
||||||
auth: {
|
auth: {
|
||||||
set: async (args: IJSONObject) => {
|
set: async (args: IJSONObject) => {
|
||||||
await connection.$query().patchAndFetch({
|
if (connection) {
|
||||||
formattedData: {
|
await connection.$query().patchAndFetch({
|
||||||
...connection.formattedData,
|
formattedData: {
|
||||||
...args,
|
...connection.formattedData,
|
||||||
},
|
...args,
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
data: connection.formattedData,
|
data: connection?.formattedData,
|
||||||
},
|
},
|
||||||
app: appData,
|
app: appData,
|
||||||
http: createHttpClient({ baseURL: appData.baseUrl }),
|
http: createHttpClient({ baseURL: appData.baseUrl }),
|
||||||
|
Reference in New Issue
Block a user