File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff 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 ] )
Original file line number Diff line number Diff 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 ] )
You can’t perform that action at this time.
0 commit comments