Skip to content

Commit f4b22a2

Browse files
Fix for agent list request
1 parent 3e6229a commit f4b22a2

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

pages/helpdesk/fullscreen.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ function HelpDeskFullscreen() {
3434
Authorization: `${developerApp.authorization?.data?.token_type} ${developerApp.authorization?.data?.access_token}`,
3535
},
3636
})
37-
.then((response) => response.json())
37+
.then(async (response) => {
38+
if (response.ok) {
39+
return await response.json()
40+
}
41+
42+
return []
43+
})
3844
.then(setAgents)
3945
}
4046
}, [developerApp])

pages/livechat/fullscreen.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ function LiveChatFullscreen() {
3434
Authorization: `${developerApp.authorization?.data?.token_type} ${developerApp.authorization?.data?.access_token}`,
3535
},
3636
})
37-
.then((response) => response.json())
37+
.then(async (response) => {
38+
if (response.ok) {
39+
return await response.json()
40+
}
41+
42+
return []
43+
})
3844
.then(setAgents)
3945
}
4046
}, [developerApp])

0 commit comments

Comments
 (0)