1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 14:54:22 +00:00

🔧 Add config parameter default value in useLoginAxios

This commit is contained in:
Steffo 2021-09-19 16:38:42 +02:00
parent 85e07f59c8
commit 13e61ab76b

View file

@ -76,7 +76,7 @@ export function useLogin() {
} }
export function useLoginAxios(config: AxiosRequestConfig) { export function useLoginAxios(config: AxiosRequestConfig = {}) {
const instance = useInstance() const instance = useInstance()
const {userData} = useLogin() const {userData} = useLogin()
@ -101,7 +101,7 @@ export function useLoginAxios(config: AxiosRequestConfig) {
...config, ...config,
baseURL: instance.value, baseURL: instance.value,
headers: { headers: {
...config.headers, ...config?.headers,
authHeader, authHeader,
} }
}) })