Skip to content

Commit

Permalink
fix get request/response failed when rawjson is null
Browse files Browse the repository at this point in the history
  • Loading branch information
freedomkk-qfeng committed Aug 31, 2023
1 parent 2dd0b86 commit 70209d8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async function handleGetToken() {
fetchACToken(dataObject).then(({code, msg, data}) => {
if(code === 0){
const {request, response, rawjson, example} = data;
const {access_token, refresh_token} = rawjson;
const {access_token, refresh_token} = rawjson || {};;
currentToken.value = access_token??"Uncertain";
currentRefreshToken.value = refresh_token??"Uncertain";
s3CurrentToken.value = access_token??"Uncertain";
Expand Down Expand Up @@ -196,7 +196,7 @@ function handleRefreshToken() {
fetchRefreshToken(dataObject).then(({code, msg, data}) => {
if(code === 0){
const {request, response, rawjson, example} = data;
const {access_token, refresh_token} = rawjson;
const {access_token, refresh_token} = rawjson || {};;
currentToken.value = access_token??"Uncertain";
currentRefreshToken.value = refresh_token??"Uncertain";
s3CurrentToken.value = access_token??"Uncertain";
Expand Down

0 comments on commit 70209d8

Please sign in to comment.