2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

Handle null response case (#7512)

This commit is contained in:
Oliver
2024-06-26 08:26:38 +10:00
committed by GitHub
parent c9e9ef1754
commit 9c3914db0a

View File

@ -82,8 +82,8 @@ export const doBasicLogin = async (username: string, password: string) => {
})
.catch((err) => {
if (
err?.response.status == 403 &&
err?.response.data.detail == 'MFA required for this user'
err?.response?.status == 403 &&
err?.response?.data?.detail == 'MFA required for this user'
) {
post(apiUrl(ApiEndpoints.user_login), {
username: username,